[lld] [llvm] [LLD][AArch64] Make adrp+ldr relaxation per-symbol all-or-nothing (PR #208396)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 05:59:41 PDT 2026
================
@@ -896,26 +900,30 @@ void AArch64::relaxTlsIeToLe(uint8_t *loc, const Relocation &rel,
llvm_unreachable("invalid relocation for TLS IE to LE relaxation");
}
-AArch64Relaxer::AArch64Relaxer(Ctx &ctx, ArrayRef<Relocation> relocs)
+AArch64Relaxer::AArch64Relaxer(Ctx &ctx, ArrayRef<Relocation> relocs,
+ uint64_t secAddr, uint8_t *buf)
: ctx(ctx) {
if (!ctx.arg.relax)
return;
- // Check if R_AARCH64_ADR_GOT_PAGE and R_AARCH64_LD64_GOT_LO12_NC
- // always appear in pairs.
+ // For a given symbol R_AARCH64_ADR_GOT_PAGE and R_AARCH64_LD64_GOT_LO12_NC
+ // relaxation is all-or-nothing. We can't relax only some of them, as there
+ // may be a jump between the two relocations.
----------------
smithp35 wrote:
Perhaps "may be a jump destination between the two relocations."
https://github.com/llvm/llvm-project/pull/208396
More information about the llvm-commits
mailing list