[PATCH] D38687: [ELF] Make section order rely on explicit member

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 05:46:06 PDT 2017


peter.smith added a comment.

I think that this could be a useful thing to do as it would allow the handling of SHF_LINK_ORDER sections to be moved from its current location in OutputSection::finalize() to just after OutSecPos is determined. This would permit an implementation of .ARM.exidx table deduplication (pr34501) to run without needing an early AssignAddresses.

One possible downside is OutSecPos will only be set for InputSections added via addSection(), ThunkSections and any other late inserted sections won't have this set. This isn't necessarily a problem as inserting sections doesn't change the relative ordering of any existing InputSections, however I think we need to either comment that OutSecPos is not set for inserted sections such as Thunks, or make AssignAddresses update the OutSecPos.


https://reviews.llvm.org/D38687





More information about the llvm-commits mailing list