Skip to content

Commit ff111a9

Browse files
glandiumint3
authored andcommitted
[lld-macho] Increase slop to prevent thunk out of range again.
Building Firefox with -O0 on arm64 mac recently hit the "FIXME: thunk range overrun" error on multiple occasions. Doubling or tripling slop was not sufficient in some cases, so quadruple it. Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D138174
1 parent 7e15ea1 commit ff111a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/MachO/ConcatOutputSection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ void TextOutputSection::finalize() {
246246
// contains several branch instructions in succession, then the distance
247247
// from the current position to the position where the thunks are inserted
248248
// grows. So leave room for a bunch of thunks.
249-
unsigned slop = 256 * thunkSize;
249+
unsigned slop = 1024 * thunkSize;
250250
while (finalIdx < endIdx && addr + size + inputs[finalIdx]->getSize() <
251251
isecVA + forwardBranchRange - slop)
252252
finalizeOne(inputs[finalIdx++]);

0 commit comments

Comments
 (0)