mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
Use a temporary varaible to improve readability. NFC.
llvm-svn: 314120
This commit is contained in:
@@ -436,15 +436,11 @@ void LinkerScript::fabricateDefaultCommands() {
|
||||
for (auto &KV : Config->SectionStartMap)
|
||||
StartAddr = std::min(StartAddr, KV.second);
|
||||
|
||||
auto Expr = [=] {
|
||||
return std::min(StartAddr, Config->ImageBase + elf::getHeaderSize());
|
||||
};
|
||||
Opt.Commands.insert(Opt.Commands.begin(),
|
||||
make<SymbolAssignment>(".",
|
||||
[=] {
|
||||
return std::min(
|
||||
StartAddr,
|
||||
Config->ImageBase +
|
||||
elf::getHeaderSize());
|
||||
},
|
||||
""));
|
||||
make<SymbolAssignment>(".", Expr, ""));
|
||||
}
|
||||
|
||||
// Add sections that didn't match any sections command.
|
||||
|
||||
Reference in New Issue
Block a user