This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF] Alloc local symbols to be added to the SymTab after global symbols
ClosedPublic

Authored by peter.smith on Feb 17 2017, 3:14 AM.

Details

Summary

This change moves the SymbolBodies with isLocal() == true before the global symbols then calculating NumLocals rather than assuming all locals are added before globals and the first NumLocals have isLocal() == true.

This permits the thunk creation code, that generates local symbols, to be moved after the pass that adds global symbols from synthetics to the symbol table.

Diff Detail

Repository
rL LLVM

Event Timeline

peter.smith created this revision.Feb 17 2017, 3:14 AM
ruiu accepted this revision.Feb 17 2017, 10:14 AM

LGTM

ELF/SyntheticSections.cpp
1091 ↗(On Diff #88869)

Please mention that that's required by the ELF standard.

This revision is now accepted and ready to land.Feb 17 2017, 10:14 AM
This revision was automatically updated to reflect the committed changes.