[PATCH] D156882: [AArch64][ELF][lld] Support dynamic R_AARCH64_AUTH_* relocations
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 21:34:11 PDT 2023
MaskRay added inline comments.
================
Comment at: lld/ELF/Driver.cpp:1582
+ config->relrPackAuthDynRelocs = getZFlag(
+ args, "pack-relative-auth-relocs", "nopack-relative-auth-relocs", false);
+
----------------
`nopack-relative-auth-relocs` is untested.
================
Comment at: lld/ELF/Writer.cpp:402
+ part.relrAuthDyn = std::make_unique<RelrSection<ELFT>>(
+ threadCount, /*isAArch64Auth*/ true);
+ add(*part.relrAuthDyn);
----------------
================
Comment at: lld/test/ELF/aarch64-ptrauth.s:3
+
+// RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/shared2.s -o %t.so.o
+// RUN: ld.lld -shared %t.so.o -soname=so -o %t.so
----------------
omit `-unknown-linux` as this applies to generic ELF.
================
Comment at: lld/test/ELF/aarch64-ptrauth.s:157
+.quad bar2 at AUTH(ia,42)
+
----------------
delete trailing blank line
================
Comment at: llvm/include/llvm/BinaryFormat/DynamicTags.def:137
+// https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#dynamic-section
+// FIXME: this should be 0x70000005, but it overlaps with AARCH64_VARIANT_PCS
+// See https://reviews.llvm.org/D93044 when it was first introduced.
----------------
This suggests that the spec `DT_AARCH64_AUTH_RELR*` should be fixed first:) https://github.com/ARM-software/abi-aa/pull/214 has changed the values now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156882/new/
https://reviews.llvm.org/D156882
More information about the llvm-commits
mailing list