[PATCH] D44780: [ELF] - Implement linker script OVERLAYs.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 26 01:55:05 PDT 2018
ruiu added inline comments.
================
Comment at: ELF/ScriptParser.cpp:460
+ // starting from the base load address specified.
+ OutputSection *OS = readOverlaySectionDescription(next());
+ OS->AddrExpr = AddrExpr;
----------------
You always call this function with `next()`, so it is better to call `next()` inside that function rather than at the call site.
================
Comment at: ELF/ScriptParser.cpp:463
+ if (Prev)
+ OS->LMAExpr = [=] { return Prev->getLMA() + Prev->Size; };
+ else
----------------
Can't you use the same `LMAExpr` again?
================
Comment at: ELF/Writer.cpp:2155
FileOffs.push_back({Sec, Sec->Offset});
- checkOverlap("file", FileOffs);
+ checkOverlap("file", FileOffs, false /* IsVirtualAddresses */);
----------------
Since this is a file-scope local function that is written close enough to this call site, you don't need `/* IsVirtualAddress */` comment.
https://reviews.llvm.org/D44780
More information about the llvm-commits
mailing list