[llvm-branch-commits] [NFCI][ELF][AArch64] Teach addRelativeReloc to emit R_AARCH64_AUTH_RELATIVE (PR #171180)

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


================
@@ -704,8 +704,10 @@ static void addRelativeReloc(Ctx &ctx, InputSectionBase &isec,
                              uint64_t offsetInSec, Symbol &sym, int64_t addend,
                              RelExpr expr, RelType type) {
   Partition &part = isec.getPartition(ctx);
+  bool isAArch64Auth =
+      ctx.arg.emachine == EM_AARCH64 && type == R_AARCH64_AUTH_ABS64;
 
-  if (sym.isTagged()) {
+  if (sym.isTagged() && !isAArch64Auth) {
----------------
jrtc27 wrote:

I've preserved the fact that sym.isTagged() is ignored for R_AARCH64_AUTH_ABS64, but suspect that the ptrauth and memtag ABIs are currently mutually-exclusive? If so I can drop this diff from this and later PRs.

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


More information about the llvm-branch-commits mailing list