[lld] [ELF] Don't relax PLT32 for branches from small into large code on x86-64 (PR #216409)
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 11:19:52 PDT 2026
jrtc27 wrote:
> In X86_64::relaxOnce, add a span guard (isUInt<31>(maxVA - minVA), no isPic condition — branches are PC-relative) and, inside the walk that already runs, handle R_PC against a non-preemptible defined function whose distance fails isInt<32>:
allocateAux + add the stub, set rel.expr = R_PLT_PC, changed = true.
This is just an unnecessary reimplementation of the thunk insertion code. Please just use that. You can pick whatever thunk sequence you like that looks like a PLT entry ABI-wise.
https://github.com/llvm/llvm-project/pull/216409
More information about the llvm-commits
mailing list