Use a temporary varaible to improve readability. NFC.

llvm-svn: 314120
This commit is contained in:
Rui Ueyama 2017-09-25 17:19:17 +00:00
parent 9297af60db
commit f5db0b36ff
1 changed files with 4 additions and 8 deletions

View File

@ -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.