[lld] [ELF] Add target-specific relocation scanning for AArch64 (PR #181099)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 12 03:33:26 PST 2026


================
@@ -156,11 +157,12 @@ class RelocScan {
     return true;
   }
 
-  // Handle TLSDESC relocation.
+  // Handle TLSDESC relocation. NEEDS_TLSDESC_NONAUTH is a no-op for
+  // non-AArch64 targets and detects incompatibility with NEEDS_TLSDESC_AUTH.
   void handleTlsDesc(RelExpr sharedExpr, RelExpr ieExpr, RelType type,
                      uint64_t offset, int64_t addend, Symbol &sym) {
     if (ctx.arg.shared) {
-      sym.setFlags(NEEDS_TLSDESC);
+      sym.setFlags(NEEDS_TLSDESC | NEEDS_TLSDESC_NONAUTH);
----------------
smithp35 wrote:

Could be worth moving the NEEDS_TLSDESC_NONAUTH comment into the scope of the if statement to localise it.

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


More information about the llvm-commits mailing list