Skip to content

Commit

Permalink
ELFRelocs/AArch64: strip R_AARCH64_AUTH_RELATIVE, per doc
Browse files Browse the repository at this point in the history
As per the released specification of aaelf64, there is no longer any
R_AARCH64_AUTH_RELATIVE. Stripping it from the def file has no
consequences, as it is unused in the code, so this change is
non-functional.
  • Loading branch information
artagnon committed Mar 28, 2024
1 parent 9214e51 commit ae9d80b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@

#ifndef ELF_RELOC
#error "ELF_RELOC must be defined"
#endif

// Based on ABI release 1.1-beta, dated 6 November 2013. NB: The cover page of
// this document, IHI0056C_beta_aaelf64.pdf, on infocenter.arm.com, still
// labels this as release 1.0.
// Based on released ABI: https://github.com/ARM-software/abi-aa, aaelf64.
// ELF64
// Null relocation: also 0x100 for ELF64
ELF_RELOC(R_AARCH64_NONE, 0)
// Data relocations
ELF_RELOC(R_AARCH64_ABS64, 0x101)
ELF_RELOC(R_AARCH64_ABS32, 0x102)
ELF_RELOC(R_AARCH64_ABS16, 0x103)
ELF_RELOC(R_AARCH64_PREL64, 0x104)
ELF_RELOC(R_AARCH64_PREL32, 0x105)
ELF_RELOC(R_AARCH64_PREL16, 0x106)
// Static relocations
ELF_RELOC(R_AARCH64_MOVW_UABS_G0, 0x107)
ELF_RELOC(R_AARCH64_MOVW_UABS_G0_NC, 0x108)
ELF_RELOC(R_AARCH64_MOVW_UABS_G1, 0x109)
Expand Down Expand Up @@ -60,11 +61,13 @@ ELF_RELOC(R_AARCH64_LD64_GOT_LO12_NC, 0x138)
ELF_RELOC(R_AARCH64_LD64_GOTPAGE_LO15, 0x139)
ELF_RELOC(R_AARCH64_PLT32, 0x13a)
ELF_RELOC(R_AARCH64_GOTPCREL32, 0x13b)
// General dynamic TLS relocations
ELF_RELOC(R_AARCH64_TLSGD_ADR_PREL21, 0x200)
ELF_RELOC(R_AARCH64_TLSGD_ADR_PAGE21, 0x201)
ELF_RELOC(R_AARCH64_TLSGD_ADD_LO12_NC, 0x202)
ELF_RELOC(R_AARCH64_TLSGD_MOVW_G1, 0x203)
ELF_RELOC(R_AARCH64_TLSGD_MOVW_G0_NC, 0x204)
// Local dynamic TLS relocations
ELF_RELOC(R_AARCH64_TLSLD_ADR_PREL21, 0x205)
ELF_RELOC(R_AARCH64_TLSLD_ADR_PAGE21, 0x206)
ELF_RELOC(R_AARCH64_TLSLD_ADD_LO12_NC, 0x207)
Expand Down Expand Up @@ -92,6 +95,7 @@ ELF_RELOC(R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, 0x21c)
ELF_RELOC(R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, 0x21d)
ELF_RELOC(R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, 0x21e)
ELF_RELOC(R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, 0x21f)
// Local exec TLS relocations
ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G2, 0x220)
ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G1, 0x221)
ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, 0x222)
Expand All @@ -108,6 +112,7 @@ ELF_RELOC(R_AARCH64_TLSLE_LDST32_TPREL_LO12, 0x22c)
ELF_RELOC(R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, 0x22d)
ELF_RELOC(R_AARCH64_TLSLE_LDST64_TPREL_LO12, 0x22e)
ELF_RELOC(R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, 0x22f)
// TLS descriptor relocations
ELF_RELOC(R_AARCH64_TLSDESC_LD_PREL19, 0x230)
ELF_RELOC(R_AARCH64_TLSDESC_ADR_PREL21, 0x231)
ELF_RELOC(R_AARCH64_TLSDESC_ADR_PAGE21, 0x232)
Expand All @@ -123,7 +128,7 @@ ELF_RELOC(R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC, 0x23b)
ELF_RELOC(R_AARCH64_TLSLD_LDST128_DTPREL_LO12, 0x23c)
ELF_RELOC(R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC, 0x23d)
ELF_RELOC(R_AARCH64_AUTH_ABS64, 0x244)
// Dynamic relocations start
// Dynamic relocations
ELF_RELOC(R_AARCH64_COPY, 0x400)
ELF_RELOC(R_AARCH64_GLOB_DAT, 0x401)
ELF_RELOC(R_AARCH64_JUMP_SLOT, 0x402)
Expand All @@ -136,8 +141,8 @@ ELF_RELOC(R_AARCH64_TLS_DTPREL64, 0x405)
ELF_RELOC(R_AARCH64_TLS_TPREL64, 0x406)
ELF_RELOC(R_AARCH64_TLSDESC, 0x407)
ELF_RELOC(R_AARCH64_IRELATIVE, 0x408)
ELF_RELOC(R_AARCH64_AUTH_RELATIVE, 0x411)

// ELF32
// ELF_RELOC(R_AARCH64_P32_NONE, 0)
ELF_RELOC(R_AARCH64_P32_ABS32, 0x001)
ELF_RELOC(R_AARCH64_P32_ABS16, 0x002)
Expand Down Expand Up @@ -216,7 +221,7 @@ ELF_RELOC(R_AARCH64_P32_TLSDESC_ADR_PAGE21, 0x07c)
ELF_RELOC(R_AARCH64_P32_TLSDESC_LD32_LO12, 0x07d)
ELF_RELOC(R_AARCH64_P32_TLSDESC_ADD_LO12, 0x07e)
ELF_RELOC(R_AARCH64_P32_TLSDESC_CALL, 0x07f)
// Dynamic relocations start
// Dynamic relocations
ELF_RELOC(R_AARCH64_P32_COPY, 0x0b4)
ELF_RELOC(R_AARCH64_P32_GLOB_DAT, 0x0b5)
ELF_RELOC(R_AARCH64_P32_JUMP_SLOT, 0x0b6)
Expand Down

0 comments on commit ae9d80b

Please sign in to comment.