This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF] Move SHF_LINK_ORDER processing earlier in Writer.cpp [NFC]
ClosedPublic

Authored by peter.smith on Dec 7 2017, 9:16 AM.

Details

Summary

By moving this step before thunk creation and other processing that depends on the size of sections, we permit removal of duplicates in the .ARM.exidx section.
This is patch 1 of 3 in sequence:

  • Move SHF_LINK_ORDER processing earlier in Writer.cpp [NFC]
  • Refactor to remove loop copying all Sections in OS->finalize() [NFC]
  • Remove Duplicate .ARM.exidx sections

This review is dependent on D38361: [ELF] Stop setting output section size early; for the addition of the OutSecPos field that permits the SHF_LINK_ORDER sections to be sorted before assignAddresses().

Diff Detail

Repository
rL LLVM