[llvm-branch-commits] [lld] [PAC][lld] Do not emit AUTH relocs against undef weak non-preemptible symbols (PR #194636)

Daniil Kovalev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 21 04:01:38 PDT 2026


================
@@ -362,13 +377,17 @@ void AArch64::scanSectionImpl(InputSectionBase &sec, Relocs<RelTy> rels,
     // only supports the descriptor based TLS (TLSDESC).
     // https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#general-restrictions
     case R_AARCH64_AUTH_TLSDESC_ADR_PAGE21:
-      sym.setFlags(NEEDS_TLSDESC_AUTH);
-      sec.addReloc({RE_AARCH64_TLSDESC_PAGE, type, offset, addend, &sym});
+      handleTlsDescAuth(RE_AARCH64_TLSDESC_PAGE);
       continue;
     case R_AARCH64_AUTH_TLSDESC_LD64_LO12:
     case R_AARCH64_AUTH_TLSDESC_ADD_LO12:
-      sym.setFlags(NEEDS_TLSDESC_AUTH);
-      sec.addReloc({R_TLSDESC, type, offset, addend, &sym});
+      handleTlsDescAuth(R_TLSDESC);
+      continue;
+    case R_AARCH64_AUTH_TLSDESC_CALL:
----------------
kovdan01 wrote:

@jrtc27 Theoretically, I can split adding support for `R_AARCH64_AUTH_TLSDESC_CALL` and the relaxation support into two separate PRs.

However, I'm not sure if it would add much value - the only reason why `R_AARCH64_AUTH_TLSDESC_CALL` was even added to documentation with corresponding support in llvm backend and lld is the need for the linker relaxation introduced in this PR.

I can update the PR description to mention `R_AARCH64_AUTH_TLSDESC_CALL` there though so it's clear that this PR is responsible for adding support for that. Please let me know if this would resolve your cocnern

https://github.com/llvm/llvm-project/pull/194636


More information about the llvm-branch-commits mailing list