[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
Mon Aug 10 08:54:40 PDT 2026


================
@@ -793,9 +793,12 @@ static void addGotAuthEntry(Ctx &ctx, Symbol &sym) {
     return;
   }
 
-  // Signed GOT requires dynamic relocation.
-  ctx.in.relaDyn->addReloc(
-      {R_AARCH64_AUTH_RELATIVE, ctx.in.got.get(), off, false, sym, 0, R_ABS});
+  // Signed GOT requires dynamic relocation unless the symbol is
+  // non-preemptible and undefined weak.
----------------
kovdan01 wrote:

We have a corresponding check ~6 lines above (and early-return if the symbol is preemptible). While it's probably not very handy when looking at diff with a small context, I suppose that readers with actual full code should be comfortable with that.

I can add an assertion or additional comment, but everything which comes to my mind looks more as bloat and clutter than help. I would be happy to adopt your suggestion if you have some

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


More information about the llvm-branch-commits mailing list