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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 21:50:23 PDT 2026


================
@@ -653,11 +672,18 @@ void AArch64::relocate(uint8_t *loc, const Relocation &rel,
     write64(ctx, loc, val);
     break;
   case R_AARCH64_AUTH_ABS64:
-    // This is used for the addend of a .relr.auth.dyn entry,
-    // which is a 32-bit value; the upper 32 bits are used to
-    // encode the schema.
-    checkInt(ctx, loc, val, 32, rel);
-    write32(ctx, loc, val);
+    if (rel.sym->isUndefined() && !rel.sym->isPreemptible) {
+      // Undefined non-preemptible symbols are statically resolved to the
----------------
MaskRay wrote:

"// Resolve to the addend. ...."

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


More information about the llvm-commits mailing list