This also requires postponing the assignment the assignment of symbols defined in input linker scripts since those can refer to output sections and in case we don't have a SECTIONS command, we need to wait until all output sections have been created and assigned addresses.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/LinkerScript.cpp | ||
---|---|---|
764 ↗ | (On Diff #91428) | That can be shorter: for (const std::unique_ptr<BaseCommand> &Base : Opt.Commands) { if (auto *Cmd = dyn_cast<SymbolAssignment>(Base.get())) assignSymbol(Cmd); else if (auto *Cmd = dyn_cast<AssertCommand>(Base.get())) Cmd->Expression(); } Also name of method doesn't really corresponds to what it do, it also processes AssertCommand, not just |
1839 ↗ | (On Diff #91428) | I think you could just expect(")"); return E; |
test/ELF/linkerscript/absolute.s | ||
8 ↗ | (On Diff #91428) | you don't need to add "requires x86" and to run llvm-mc again. |
Comment Actions
Generally looking good, but this might conflict with https://reviews.llvm.org/D30891. Rafael?
ELF/LinkerScript.cpp | ||
---|---|---|
1829 ↗ | (On Diff #91610) | Can you add this at the start of this list? They should be sorted alphabetically. I'll do that later. |
1830 ↗ | (On Diff #91610) | You can use readParenExpr. |