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 | 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 | I think you could just expect(")");
return E; | |
| test/ELF/linkerscript/absolute.s | ||
| 8 | 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 | ||
|---|---|---|
| 1834 | Can you add this at the start of this list? They should be sorted alphabetically. I'll do that later. | |
| 1835 | You can use readParenExpr. | |
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
assign symbols.