[lld] [ELF] Retain .rela.dyn for PPC64 PI long-branch thunks (PR #212078)
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 1 09:53:33 PDT 2026
================
@@ -1747,6 +1747,17 @@ template <class ELFT> void Writer<ELFT>::optimizeBasicBlockJumps() {
is->trim();
}
+// Sections that finalizeAddressDependentContent may add to.
+static bool mayGrowLate(Ctx &ctx, SyntheticSection *sec) {
+ if (sec != ctx.in.relaDyn.get())
+ return false;
+ // Relocations may move here from .relr.auth.dyn.
+ if (ctx.in.relrAuthDyn && ctx.in.relrAuthDyn->isNeeded())
+ return true;
+ // PPC64PILongBranchThunk adds a relative relocation for its .branch_lt entry.
+ return ctx.in.ppc64LongBranchTarget && ctx.arg.isPic;
----------------
jrtc27 wrote:
Should this technically check picThunk instead?
https://github.com/llvm/llvm-project/pull/212078
More information about the llvm-commits
mailing list