- Move the responsibility to call SymbolBody::setDynamicSymbolTableIndex() from hash table to dynamic symbol table.
- Hash table is not longer responsible for filling dynamic symbol table.
- The final order of symbols of both symbol tables is set before writing phase starts.
Details
Details
- Reviewers
ruiu • rafael - Commits
- rGab665fc47599: [ELF2] Determine the order of entries of symbol tables in the finalize() phase.
rLLD250864: [ELF2] Determine the order of entries of symbol tables in the finalize() phase.
rL250864: [ELF2] Determine the order of entries of symbol tables in the finalize() phase.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/OutputSections.cpp | ||
---|---|---|
694–697 ↗ | (On Diff #37911) | It's a replacement for removed lines 813-818. |
Comment Actions
LGTM with a nit.
ELF/OutputSections.cpp | ||
---|---|---|
698 ↗ | (On Diff #37916) | Early return before this 'else' to remove this 'else'. |
Comment Actions
This comment is not directly related to this change (so you can ignore), but I noticed that the symbol handling in SymbolTableSection is very odd. We do call addSymbol only when includeInSymtab() is true for a symbol, but we basically discard that information and iterate over the symbol table again inside SymbolTableSection when writing an output (and call includeInSymtab() again so that the output is consistent). This needs to be straightened.
Comment Actions
Yes, that's awesome. Local symbols are handled differently, so it's probably a bit hard to remove that.