[PATCH] D29327: [LLD][ELF] Use Synthetic Sections for Thunks (try 2)
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 06:43:36 PST 2017
peter.smith created this revision.
This is https://reviews.llvm.org/D29129 with the Windows debug build problems fixed.
The MSVC debug implementation of std::merge enforces the preconditions required by the C++ standard. This includes checking that both ranges are sortable by the predicate and that if (A < B) then !(B > A). https://reviews.llvm.org/D29129 the comparison routine did not conform to the requirements of the standard. This change fixes the predicate.
The changes made are all related to the comparison routine:
- add getTargetInputSection to ThunkSection
- correct section flags in constructor. ThunkSections was missing SHF_EXECINSTR
- Set the OutSecOff of the per-OutputSection ThunkSection to be the limit of the executable sections, previously we set the OutSecOff to size, and checked in the predicate whether the Thunk and InputSection were executable.
- Rewrite the MergeComp predicate to use only OutSecOff and as a tie-breaker for Mips LA25 whether the next section is our Thunks Target.
I've checked that this builds and runs the tests on MSVC 2015. Sending for review as it is more than just a simple syntax fix.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 73510 bytes
Desc: not available
More information about the llvm-commits