forked from OSchip/llvm-project
[ELF][AArch64] Correct relocation codes for R_<CLS>_PLT32
The relocation codes for R_<CLS>_PLT32 are incorrectly in the dynamic relocation range that starts at 1024 for AArch64 and 180 for AArch64_32. Correct these so that they start at the next available static relocation code in the non-TLS range. The R_<CLS>_PLT32 description is currently in unpublished so this change corrects LLVM to match the values that will appear in the final ELF for the 64-bit Arm Architecture document. Differential Revision: https://reviews.llvm.org/D81410
This commit is contained in:
parent
040eca7717
commit
60f5b0ec7c
|
@ -58,6 +58,7 @@ ELF_RELOC(R_AARCH64_LD64_GOTOFF_LO15, 0x136)
|
|||
ELF_RELOC(R_AARCH64_ADR_GOT_PAGE, 0x137)
|
||||
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_TLSGD_ADR_PREL21, 0x200)
|
||||
ELF_RELOC(R_AARCH64_TLSGD_ADR_PAGE21, 0x201)
|
||||
ELF_RELOC(R_AARCH64_TLSGD_ADD_LO12_NC, 0x202)
|
||||
|
@ -120,6 +121,7 @@ ELF_RELOC(R_AARCH64_TLSLE_LDST128_TPREL_LO12, 0x23a)
|
|||
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)
|
||||
// Dynamic relocations start
|
||||
ELF_RELOC(R_AARCH64_COPY, 0x400)
|
||||
ELF_RELOC(R_AARCH64_GLOB_DAT, 0x401)
|
||||
ELF_RELOC(R_AARCH64_JUMP_SLOT, 0x402)
|
||||
|
@ -132,7 +134,6 @@ 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_PLT32, 0x409)
|
||||
|
||||
// ELF_RELOC(R_AARCH64_P32_NONE, 0)
|
||||
ELF_RELOC(R_AARCH64_P32_ABS32, 0x001)
|
||||
|
@ -163,6 +164,7 @@ ELF_RELOC(R_AARCH64_P32_GOT_LD_PREL19, 0x019)
|
|||
ELF_RELOC(R_AARCH64_P32_ADR_GOT_PAGE, 0x01a)
|
||||
ELF_RELOC(R_AARCH64_P32_LD32_GOT_LO12_NC, 0x01b)
|
||||
ELF_RELOC(R_AARCH64_P32_LD32_GOTPAGE_LO14, 0x01c)
|
||||
ELF_RELOC(R_AARCH64_P32_PLT32, 0x01d)
|
||||
ELF_RELOC(R_AARCH64_P32_TLSGD_ADR_PREL21, 0x050)
|
||||
ELF_RELOC(R_AARCH64_P32_TLSGD_ADR_PAGE21, 0x051)
|
||||
ELF_RELOC(R_AARCH64_P32_TLSGD_ADD_LO12_NC, 0x052)
|
||||
|
@ -211,6 +213,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
|
||||
ELF_RELOC(R_AARCH64_P32_COPY, 0x0b4)
|
||||
ELF_RELOC(R_AARCH64_P32_GLOB_DAT, 0x0b5)
|
||||
ELF_RELOC(R_AARCH64_P32_JUMP_SLOT, 0x0b6)
|
||||
|
@ -220,4 +223,3 @@ ELF_RELOC(R_AARCH64_P32_TLS_DTPMOD, 0x0b9)
|
|||
ELF_RELOC(R_AARCH64_P32_TLS_TPREL, 0x0ba)
|
||||
ELF_RELOC(R_AARCH64_P32_TLSDESC, 0x0bb)
|
||||
ELF_RELOC(R_AARCH64_P32_IRELATIVE, 0x0bc)
|
||||
ELF_RELOC(R_AARCH64_P32_PLT32, 0x0bd)
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
# CHECK: Type: R_AARCH64_ADR_GOT_PAGE (311)
|
||||
# CHECK: Type: R_AARCH64_LD64_GOT_LO12_NC (312)
|
||||
# CHECK: Type: R_AARCH64_LD64_GOTPAGE_LO15 (313)
|
||||
# CHECK: Type: R_AARCH64_PLT32 (314)
|
||||
# CHECK: Type: R_AARCH64_TLSGD_ADR_PREL21 (512)
|
||||
# CHECK: Type: R_AARCH64_TLSGD_ADR_PAGE21 (513)
|
||||
# CHECK: Type: R_AARCH64_TLSGD_ADD_LO12_NC (514)
|
||||
|
@ -127,7 +128,6 @@
|
|||
# CHECK: Type: R_AARCH64_TLS_TPREL64 (1030)
|
||||
# CHECK: Type: R_AARCH64_TLSDESC (1031)
|
||||
# CHECK: Type: R_AARCH64_IRELATIVE (1032)
|
||||
# CHECK: Type: R_AARCH64_PLT32 (1033)
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
|
@ -197,6 +197,7 @@ Sections:
|
|||
- Type: R_AARCH64_ADR_GOT_PAGE
|
||||
- Type: R_AARCH64_LD64_GOT_LO12_NC
|
||||
- Type: R_AARCH64_LD64_GOTPAGE_LO15
|
||||
- Type: R_AARCH64_PLT32
|
||||
- Type: R_AARCH64_TLSGD_ADR_PREL21
|
||||
- Type: R_AARCH64_TLSGD_ADR_PAGE21
|
||||
- Type: R_AARCH64_TLSGD_ADD_LO12_NC
|
||||
|
@ -268,4 +269,3 @@ Sections:
|
|||
- Type: R_AARCH64_TLS_TPREL64
|
||||
- Type: R_AARCH64_TLSDESC
|
||||
- Type: R_AARCH64_IRELATIVE
|
||||
- Type: R_AARCH64_PLT32
|
||||
|
|
Loading…
Reference in New Issue