[PATCH] D34689: [LLD][ELF] Pre-create ThunkSections at Target specific intervals

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 10:17:26 PDT 2017


peter.smith added a comment.





================
Comment at: ELF/Relocations.cpp:1080
+          ISLimit = IS->OutSecOff + IS->getSize();
+          if (ISLimit >= ThunkUpperBound) {
+            addThunkSection(OS, ISR, PrevISLimit);
----------------
smeenai wrote:
> Should this be `>` instead of `>=`? `ISLimit` is one past the ending address of the current `IS`, and `ThunkUpperBound` is the maximum starting address of the thunk, so in the case where `ISLimit` == `ThunkUpperBound`, the thunk should be placed immediately after that `IS`, which is what a `>` comparison would accomplish.
I think you are most likely correct. I've got to leave the office right now, will pick this back up on Monday. Thanks very much again for the comments.


https://reviews.llvm.org/D34689





More information about the llvm-commits mailing list