[PATCH] D116705: [lld-macho] Increase slops to prevent thunk out of range

Vincent Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 6 11:56:13 PST 2022


thevinster updated this revision to Diff 397955.
thevinster edited the summary of this revision.
thevinster added a comment.

Increase to 256


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116705/new/

https://reviews.llvm.org/D116705

Files:
  lld/MachO/ConcatOutputSection.cpp


Index: lld/MachO/ConcatOutputSection.cpp
===================================================================
--- lld/MachO/ConcatOutputSection.cpp
+++ lld/MachO/ConcatOutputSection.cpp
@@ -244,7 +244,7 @@
     // contains several branch instructions in succession, then the distance
     // from the current position to the position where the thunks are inserted
     // grows. So leave room for a bunch of thunks.
-    unsigned slop = 100 * thunkSize;
+    unsigned slop = 256 * thunkSize;
     while (finalIdx < endIdx && isecAddr + inputs[finalIdx]->getSize() <
                                     isecVA + forwardBranchRange - slop)
       finalizeOne(inputs[finalIdx++]);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116705.397955.patch
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220106/3ca000b8/attachment.bin>


More information about the llvm-commits mailing list