[lld] [llvm] [lld-macho] Fix thunks for non-__text TEXT sections (PR #99052)
Daniel Bertalan via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 13:33:06 PDT 2024
================
@@ -127,10 +127,20 @@ bool TextOutputSection::needsThunks() const {
uint64_t isecAddr = addr;
for (ConcatInputSection *isec : inputs)
isecAddr = alignToPowerOf2(isecAddr, isec->align) + isec->getSize();
- if (isecAddr - addr + in.stubs->getSize() <=
- std::min(target->backwardBranchRange, target->forwardBranchRange))
+ // Other sections besides __text might be small enough to pass this
+ // test but nevertheless need thunks for calling into ohter sections.
----------------
BertalanD wrote:
```suggestion
// test but nevertheless need thunks for calling into other sections.
```
https://github.com/llvm/llvm-project/pull/99052
More information about the llvm-commits
mailing list