This is an archive of the discontinued LLVM Phabricator instance.

[ELF2] Ensure the DynSymTab to be finalized before the others
ClosedPublic

Authored by ikudrin on Oct 30 2015, 1:03 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin updated this revision to Diff 38787.Oct 30 2015, 1:03 AM
ikudrin retitled this revision from to [ELF2] Ensure the DynSymTab to be finalized before the others.
ikudrin updated this object.
ikudrin added reviewers: rafael, ruiu.
ikudrin added a project: lld.
ikudrin added a subscriber: llvm-commits.
ruiu accepted this revision.Oct 31 2015, 9:14 AM
ruiu edited edge metadata.

LGTM with a nit.

ELF/Writer.cpp
584–591 ↗(On Diff #38787)

Can you merge these two?

// Finalizers fix each section's size.
// .dynamic section's finalizer may add strings to .dynstr, so finalize that early.
// Likewise, .dynsym is finalized early since that may fill up .gnu.hash.
Out<ELFT>::Dynamic->finalize();
if (isOutputDynamic())
  Out<ELFT>::DynSymTab->finalize();
This revision is now accepted and ready to land.Oct 31 2015, 9:14 AM
This revision was automatically updated to reflect the committed changes.