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().