[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:11:10 PDT 2026
================
@@ -757,8 +757,15 @@ static void addPltEntry(Ctx &ctx, PltSection &plt, GotPltSection &gotPlt,
return;
}
gotPlt.addEntry(sym);
- rel.addReloc(
- {type, &gotPlt, sym.getGotPltOffset(ctx), isPreemptible, sym, 0, expr});
----------------
jrtc27 wrote:
I don't see how you'd reliably encode it in the API. The fact that plt and gotPlt are added to at the same time *is* how we guarantee that aspect of ABI. You *could* I suppose have an assertion when writing the file that the entries are in correspondence, but that's about the best you cn do. Blind editing (whether by an ignorant human or an A"I") of nuanced parts of the linker like these is never going to end well.
https://github.com/llvm/llvm-project/pull/216409
More information about the llvm-commits
mailing list