Skip to content
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][ELF][AArch64] Define static AUTH TLSDESC relocations #113716

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

kovdan01
Copy link
Contributor

@kovdan01 kovdan01 commented Oct 25, 2024

See specification ARM-software/abi-aa#295

@kovdan01 kovdan01 self-assigned this Oct 25, 2024
@kovdan01
Copy link
Contributor Author

See also ARM-software/abi-aa#293

@kovdan01
Copy link
Contributor Author

As discussed in ARM-software/abi-aa#293 (comment), these relocation codes are OK as they belong to the private space reserved for experiments.

@kovdan01 kovdan01 marked this pull request as ready for review October 28, 2024 17:51
@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2024

@llvm/pr-subscribers-llvm-binary-utilities

Author: Daniil Kovalev (kovdan01)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/113716.diff

2 Files Affected:

  • (modified) llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def (+3)
  • (modified) llvm/test/tools/llvm-readobj/ELF/reloc-types-aarch64.test (+6)
diff --git a/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def b/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def
index 6f0e948a98c5fa..f28a4646cc6da1 100644
--- a/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def
+++ b/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def
@@ -158,6 +158,9 @@ 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)
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 2833c0b59ae13d..458761a2ba6b4d 100644
--- a/llvm/test/tools/llvm-readobj/ELF/reloc-types-aarch64.test
+++ b/llvm/test/tools/llvm-readobj/ELF/reloc-types-aarch64.test
@@ -144,6 +144,9 @@
 # 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)
@@ -298,6 +301,9 @@ Sections:
       - Type: R_AARCH64_AUTH_LD64_GOTPAGE_LO15
       - Type: R_AARCH64_AUTH_GOT_ADD_LO12_NC
       - Type: R_AARCH64_AUTH_GOT_ADR_PREL_LO21
+      - Type: R_AARCH64_AUTH_TLSDESC_ADR_PAGE21
+      - Type: R_AARCH64_AUTH_TLSDESC_LD64_LO12
+      - Type: R_AARCH64_AUTH_TLSDESC_ADD_LO12
       - Type: R_AARCH64_AUTH_GLOB_DAT
       - Type: R_AARCH64_AUTH_TLSDESC
       - Type: R_AARCH64_AUTH_IRELATIVE

Copy link
Collaborator

@jh7370 jh7370 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, once the values are confirmed as good in the reference material.

It may be worth including a link in the commit description to the relevant documentation, to reduce the number of hoops that have to be jumped through to get to the source of these reloc types.

@kovdan01
Copy link
Contributor Author

It may be worth including a link in the commit description to the relevant documentation, to reduce the number of hoops that have to be jumped through to get to the source of these reloc types.

Added a link to the PR in the ARM's repo, thanks!

Looks fine to me, once the values are confirmed as good in the reference material.

@smithp35 If the values are OK, could you please give an explicit approval here?

@kovdan01
Copy link
Contributor Author

Looks fine to me, once the values are confirmed as good in the reference material.

@smithp35 If the values are OK, could you please give an explicit approval here?

@smithp35
Copy link
Collaborator

Looks fine to me, once the values are confirmed as good in the reference material.

@smithp35 If the values are OK, could you please give an explicit approval here?

I can confirm that the values match what I wrote in the spec. BTW feel free to comment/approve the ABI PR ARM-software/abi-aa#295

@kovdan01 kovdan01 merged commit 3250612 into llvm:main Nov 18, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants