[lld] [PAC][lld][AArch64][ELF] Support signed GOT (PR #113815)

Daniil Kovalev via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 8 06:09:24 PST 2024


================
@@ -1090,7 +1110,18 @@ void RelocationScanner::processAux(RelExpr expr, RelType type, uint64_t offset,
     } else if (!sym.isTls() || ctx.arg.emachine != EM_LOONGARCH) {
       // Many LoongArch TLS relocs reuse the RE_LOONGARCH_GOT type, in which
       // case the NEEDS_GOT flag shouldn't get set.
-      sym.setFlags(NEEDS_GOT);
+      bool needsGotAuth =
+          (expr == RE_AARCH64_AUTH_GOT || expr == RE_AARCH64_AUTH_GOT_PAGE_PC);
+      uint16_t flags = sym.flags.load(std::memory_order_relaxed);
+      if (!(flags & NEEDS_GOT)) {
----------------
kovdan01 wrote:

Thanks! Fixed in 77361c75f4e6e8b99121f8a059a48593eb6a754d

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


More information about the llvm-commits mailing list