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

One of our internal arm64 apps hit a thunk out of range error when building
with LLD. Per the comment, I'm arbitrarily increasing slop size to 256.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D116705
This commit is contained in:
Vincent Lee 2022-01-05 15:05:09 -08:00
parent bf9d8d9dfb
commit a963bc490d
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ void ConcatOutputSection::finalize() {
// 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++]);