[PATCH] D34034: [LLD][ELF] Make createThunks() iterate until no more thunks added
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 03:40:57 PDT 2017
peter.smith updated this revision to Diff 102515.
peter.smith added a comment.
Thank you for all the comments. I've updated the diff to:
- Remove the skipping of relocations if we are already a ThunkSection, as it is not needed for the current set of thunks.
- Remove AddressesChanged.
- Remove the loop to be replaced with two calls.
There is a type of range extension Thunk that can be used when the target is only just out of range. The contents of the thunk is just a branch instruction, which itself has a limited range and could trigger another thunk. I'm not proposing to implement this type of thunk as it adds quite a bit of additional complexity.
My plan once I've got the existing reviews accepted (https://reviews.llvm.org/D34034, https://reviews.llvm.org/D34035 and D35037) is:
- allocate addresses before creating range thunks.
- pre-create ThunkSections at roughly branch range intervals rather than just at the end of the executable section.
- Add range thunk support, these will be assigned to a ThunkSection in range of the caller
- Add script and non-script test cases
These will most likely be split up into smaller patches than I've identified here.
https://reviews.llvm.org/D34034
Files:
ELF/Relocations.cpp
ELF/Relocations.h
ELF/Writer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34034.102515.patch
Type: text/x-patch
Size: 5164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170614/0befd579/attachment.bin>
More information about the llvm-commits
mailing list