[llvm-branch-commits] [NFC][ELF][AArch64] Replace memtag hack with less-confusing code (PR #171182)

Jessica Clarke via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 8 10:36:34 PST 2025


================
@@ -741,7 +741,7 @@ static void addRelativeReloc(Ctx &ctx, InputSectionBase &isec,
   // https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst#841extended-semantics-of-r_aarch64_relative
   if (sym.isTagged() && !isAArch64Auth &&
       (addend < 0 || static_cast<uint64_t>(addend) >= sym.getSize()))
-    isec.addReloc({expr, type, offsetInSec, addend, &sym});
+    isec.addReloc({R_ADDEND_NEG, type, offsetInSec, addend, &sym});
----------------
jrtc27 wrote:

But I'm deferring that until https://github.com/llvm/llvm-project/pull/171180/files#r2599706437 is resolved, since this gets rather uglier if `!isAArch64Auth` needs to stay

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


More information about the llvm-branch-commits mailing list