-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PAC][llvm-readobj][AArch64] Move PAuth GOT relocs out of private space #118214
Conversation
Apply change from the spec ARM-software/abi-aa#300
@llvm/pr-subscribers-llvm-binary-utilities Author: Daniil Kovalev (kovdan01) ChangesApply change from the spec ARM-software/abi-aa#300 Full diff: https://github.com/llvm/llvm-project/pull/118214.diff 2 Files Affected:
diff --git a/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def b/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def
index f28a4646cc6da1..05b79eae573f7a 100644
--- a/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def
+++ b/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def
@@ -143,27 +143,27 @@ ELF_RELOC(R_AARCH64_IRELATIVE, 0x408)
// PAuthABI static and dynamic relocations: defined in pauthabielf64,
// https://github.com/ARM-software/abi-aa
ELF_RELOC(R_AARCH64_AUTH_ABS64, 0x244)
+ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G0, 0x245)
+ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G0_NC, 0x246)
+ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G1, 0x247)
+ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G1_NC, 0x248)
+ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G2, 0x249)
+ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G2_NC, 0x24a)
+ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G3, 0x24b)
+ELF_RELOC(R_AARCH64_AUTH_GOT_LD_PREL19, 0x24c)
+ELF_RELOC(R_AARCH64_AUTH_LD64_GOTOFF_LO15, 0x24d)
+ELF_RELOC(R_AARCH64_AUTH_ADR_GOT_PAGE, 0x24e)
+ELF_RELOC(R_AARCH64_AUTH_LD64_GOT_LO12_NC, 0x24f)
+ELF_RELOC(R_AARCH64_AUTH_LD64_GOTPAGE_LO15, 0x250)
+ELF_RELOC(R_AARCH64_AUTH_GOT_ADD_LO12_NC, 0x251)
+ELF_RELOC(R_AARCH64_AUTH_GOT_ADR_PREL_LO21, 0x252)
+ELF_RELOC(R_AARCH64_AUTH_TLSDESC_ADR_PAGE21, 0x253)
+ELF_RELOC(R_AARCH64_AUTH_TLSDESC_LD64_LO12, 0x254)
+ELF_RELOC(R_AARCH64_AUTH_TLSDESC_ADD_LO12, 0x255)
ELF_RELOC(R_AARCH64_AUTH_RELATIVE, 0x411)
-ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G0, 0x8110)
-ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G0_NC, 0x8111)
-ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G1, 0x8112)
-ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G1_NC, 0x8113)
-ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G2, 0x8114)
-ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G2_NC, 0x8115)
-ELF_RELOC(R_AARCH64_AUTH_MOVW_GOTOFF_G3, 0x8116)
-ELF_RELOC(R_AARCH64_AUTH_GOT_LD_PREL19, 0x8117)
-ELF_RELOC(R_AARCH64_AUTH_LD64_GOTOFF_LO15, 0x8118)
-ELF_RELOC(R_AARCH64_AUTH_ADR_GOT_PAGE, 0x8119)
-ELF_RELOC(R_AARCH64_AUTH_LD64_GOT_LO12_NC, 0x811a)
-ELF_RELOC(R_AARCH64_AUTH_LD64_GOTPAGE_LO15, 0x811b)
-ELF_RELOC(R_AARCH64_AUTH_GOT_ADD_LO12_NC, 0x811c)
-ELF_RELOC(R_AARCH64_AUTH_GOT_ADR_PREL_LO21, 0x811d)
-ELF_RELOC(R_AARCH64_AUTH_TLSDESC_ADR_PAGE21, 0x811e)
-ELF_RELOC(R_AARCH64_AUTH_TLSDESC_LD64_LO12, 0x811f)
-ELF_RELOC(R_AARCH64_AUTH_TLSDESC_ADD_LO12, 0x8120)
-ELF_RELOC(R_AARCH64_AUTH_GLOB_DAT, 0xe201)
-ELF_RELOC(R_AARCH64_AUTH_TLSDESC, 0xe202)
-ELF_RELOC(R_AARCH64_AUTH_IRELATIVE, 0xe203)
+ELF_RELOC(R_AARCH64_AUTH_GLOB_DAT, 0x412)
+ELF_RELOC(R_AARCH64_AUTH_TLSDESC, 0x413)
+ELF_RELOC(R_AARCH64_AUTH_IRELATIVE, 0x414)
// ELF32
// ELF_RELOC(R_AARCH64_P32_NONE, 0)
diff --git a/llvm/test/tools/llvm-readobj/ELF/reloc-types-aarch64.test b/llvm/test/tools/llvm-readobj/ELF/reloc-types-aarch64.test
index 458761a2ba6b4d..d7fe77cf658af0 100644
--- a/llvm/test/tools/llvm-readobj/ELF/reloc-types-aarch64.test
+++ b/llvm/test/tools/llvm-readobj/ELF/reloc-types-aarch64.test
@@ -120,6 +120,23 @@
# CHECK: Type: R_AARCH64_TLSLD_LDST128_DTPREL_LO12 (572)
# CHECK: Type: R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC (573)
# CHECK: Type: R_AARCH64_AUTH_ABS64 (580)
+# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G0 (581)
+# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G0_NC (582)
+# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G1 (583)
+# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G1_NC (584)
+# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G2 (585)
+# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G2_NC (586)
+# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G3 (587)
+# CHECK: Type: R_AARCH64_AUTH_GOT_LD_PREL19 (588)
+# CHECK: Type: R_AARCH64_AUTH_LD64_GOTOFF_LO15 (589)
+# CHECK: Type: R_AARCH64_AUTH_ADR_GOT_PAGE (590)
+# CHECK: Type: R_AARCH64_AUTH_LD64_GOT_LO12_NC (591)
+# CHECK: Type: R_AARCH64_AUTH_LD64_GOTPAGE_LO15 (592)
+# CHECK: Type: R_AARCH64_AUTH_GOT_ADD_LO12_NC (593)
+# CHECK: Type: R_AARCH64_AUTH_GOT_ADR_PREL_LO21 (594)
+# CHECK: Type: R_AARCH64_AUTH_TLSDESC_ADR_PAGE21 (595)
+# CHECK: Type: R_AARCH64_AUTH_TLSDESC_LD64_LO12 (596)
+# CHECK: Type: R_AARCH64_AUTH_TLSDESC_ADD_LO12 (597)
# CHECK: Type: R_AARCH64_COPY (1024)
# CHECK: Type: R_AARCH64_GLOB_DAT (1025)
# CHECK: Type: R_AARCH64_JUMP_SLOT (1026)
@@ -130,26 +147,9 @@
# CHECK: Type: R_AARCH64_TLSDESC (1031)
# CHECK: Type: R_AARCH64_IRELATIVE (1032)
# CHECK: Type: R_AARCH64_AUTH_RELATIVE (1041)
-# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G0 (33040)
-# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G0_NC (33041)
-# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G1 (33042)
-# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G1_NC (33043)
-# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G2 (33044)
-# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G2_NC (33045)
-# CHECK: Type: R_AARCH64_AUTH_MOVW_GOTOFF_G3 (33046)
-# CHECK: Type: R_AARCH64_AUTH_GOT_LD_PREL19 (33047)
-# CHECK: Type: R_AARCH64_AUTH_LD64_GOTOFF_LO15 (33048)
-# CHECK: Type: R_AARCH64_AUTH_ADR_GOT_PAGE (33049)
-# CHECK: Type: R_AARCH64_AUTH_LD64_GOT_LO12_NC (33050)
-# CHECK: Type: R_AARCH64_AUTH_LD64_GOTPAGE_LO15 (33051)
-# CHECK: Type: R_AARCH64_AUTH_GOT_ADD_LO12_NC (33052)
-# CHECK: Type: R_AARCH64_AUTH_GOT_ADR_PREL_LO21 (33053)
-# CHECK: Type: R_AARCH64_AUTH_TLSDESC_ADR_PAGE21 (33054)
-# CHECK: Type: R_AARCH64_AUTH_TLSDESC_LD64_LO12 (33055)
-# CHECK: Type: R_AARCH64_AUTH_TLSDESC_ADD_LO12 (33056)
-# CHECK: Type: R_AARCH64_AUTH_GLOB_DAT (57857)
-# CHECK: Type: R_AARCH64_AUTH_TLSDESC (57858)
-# CHECK: Type: R_AARCH64_AUTH_IRELATIVE (57859)
+# CHECK: Type: R_AARCH64_AUTH_GLOB_DAT (1042)
+# CHECK: Type: R_AARCH64_AUTH_TLSDESC (1043)
+# CHECK: Type: R_AARCH64_AUTH_IRELATIVE (1044)
--- !ELF
FileHeader:
@@ -277,16 +277,6 @@ Sections:
- Type: R_AARCH64_TLSLD_LDST128_DTPREL_LO12
- Type: R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC
- Type: R_AARCH64_AUTH_ABS64
- - Type: R_AARCH64_COPY
- - Type: R_AARCH64_GLOB_DAT
- - Type: R_AARCH64_JUMP_SLOT
- - Type: R_AARCH64_RELATIVE
- - Type: R_AARCH64_TLS_DTPMOD64
- - Type: R_AARCH64_TLS_DTPREL64
- - Type: R_AARCH64_TLS_TPREL64
- - Type: R_AARCH64_TLSDESC
- - Type: R_AARCH64_IRELATIVE
- - Type: R_AARCH64_AUTH_RELATIVE
- Type: R_AARCH64_AUTH_MOVW_GOTOFF_G0
- Type: R_AARCH64_AUTH_MOVW_GOTOFF_G0_NC
- Type: R_AARCH64_AUTH_MOVW_GOTOFF_G1
@@ -304,6 +294,16 @@ Sections:
- Type: R_AARCH64_AUTH_TLSDESC_ADR_PAGE21
- Type: R_AARCH64_AUTH_TLSDESC_LD64_LO12
- Type: R_AARCH64_AUTH_TLSDESC_ADD_LO12
+ - Type: R_AARCH64_COPY
+ - Type: R_AARCH64_GLOB_DAT
+ - Type: R_AARCH64_JUMP_SLOT
+ - Type: R_AARCH64_RELATIVE
+ - Type: R_AARCH64_TLS_DTPMOD64
+ - Type: R_AARCH64_TLS_DTPREL64
+ - Type: R_AARCH64_TLS_TPREL64
+ - Type: R_AARCH64_TLSDESC
+ - Type: R_AARCH64_IRELATIVE
+ - Type: R_AARCH64_AUTH_RELATIVE
- Type: R_AARCH64_AUTH_GLOB_DAT
- Type: R_AARCH64_AUTH_TLSDESC
- Type: R_AARCH64_AUTH_IRELATIVE
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For llvm-readobj, we prefer [llvm-readobj]
instead of [readobj]
.
[PAC]
and [ELF]
are probably less valuable tags. I'd remove them if I authored the patch.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/4952 Here is the relevant piece of the build log for the reference
|
Apply change from the spec ARM-software/abi-aa#300