llvm-6502/include/llvm/Support/ELFRelocs/AArch64.def
Will Newton 87a2f3751c Update AArch64 ELF relocations to ABI 1.0
This mostly entails adding relocations, however there are a couple of
changes to existing relocations:

1. R_AARCH64_NONE is defined to be zero rather than 256

R_AARCH64_NONE has been defined to be zero for a long time elsewhere
e.g. binutils and glibc since the submission of the AArch64 port in
2012 so this is required for compatibility.

2. R_AARCH64_TLSDESC_ADR_PAGE renamed to R_AARCH64_TLSDESC_ADR_PAGE21

I don't think there is any way for relocation names to leak out of LLVM
so this should not break anything.

Tested with check-all with no regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222821 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-26 10:49:18 +00:00

148 lines
6.9 KiB
Modula-2

#ifndef ELF_RELOC
#error "ELF_RELOC must be defined"
#endif
// ABI release 1.0
ELF_RELOC(R_AARCH64_NONE, 0)
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)
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)
ELF_RELOC(R_AARCH64_MOVW_UABS_G1_NC, 0x10a)
ELF_RELOC(R_AARCH64_MOVW_UABS_G2, 0x10b)
ELF_RELOC(R_AARCH64_MOVW_UABS_G2_NC, 0x10c)
ELF_RELOC(R_AARCH64_MOVW_UABS_G3, 0x10d)
ELF_RELOC(R_AARCH64_MOVW_SABS_G0, 0x10e)
ELF_RELOC(R_AARCH64_MOVW_SABS_G1, 0x10f)
ELF_RELOC(R_AARCH64_MOVW_SABS_G2, 0x110)
ELF_RELOC(R_AARCH64_LD_PREL_LO19, 0x111)
ELF_RELOC(R_AARCH64_ADR_PREL_LO21, 0x112)
ELF_RELOC(R_AARCH64_ADR_PREL_PG_HI21, 0x113)
ELF_RELOC(R_AARCH64_ADR_PREL_PG_HI21_NC, 0x114)
ELF_RELOC(R_AARCH64_ADD_ABS_LO12_NC, 0x115)
ELF_RELOC(R_AARCH64_LDST8_ABS_LO12_NC, 0x116)
ELF_RELOC(R_AARCH64_TSTBR14, 0x117)
ELF_RELOC(R_AARCH64_CONDBR19, 0x118)
ELF_RELOC(R_AARCH64_JUMP26, 0x11a)
ELF_RELOC(R_AARCH64_CALL26, 0x11b)
ELF_RELOC(R_AARCH64_LDST16_ABS_LO12_NC, 0x11c)
ELF_RELOC(R_AARCH64_LDST32_ABS_LO12_NC, 0x11d)
ELF_RELOC(R_AARCH64_LDST64_ABS_LO12_NC, 0x11e)
ELF_RELOC(R_AARCH64_MOVW_PREL_G0, 0x11f)
ELF_RELOC(R_AARCH64_MOVW_PREL_G0_NC, 0x120)
ELF_RELOC(R_AARCH64_MOVW_PREL_G1, 0x121)
ELF_RELOC(R_AARCH64_MOVW_PREL_G1_NC, 0x122)
ELF_RELOC(R_AARCH64_MOVW_PREL_G2, 0x123)
ELF_RELOC(R_AARCH64_MOVW_PREL_G2_NC, 0x124)
ELF_RELOC(R_AARCH64_MOVW_PREL_G3, 0x125)
ELF_RELOC(R_AARCH64_LDST128_ABS_LO12_NC, 0x12b)
ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G0, 0x12c)
ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G0_NC, 0x12d)
ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G1, 0x12e)
ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G1_NC, 0x12f)
ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G2, 0x130)
ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G2_NC, 0x131)
ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G3, 0x132)
ELF_RELOC(R_AARCH64_GOTREL64, 0x133)
ELF_RELOC(R_AARCH64_GOTREL32, 0x134)
ELF_RELOC(R_AARCH64_GOT_LD_PREL19, 0x135)
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_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)
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)
ELF_RELOC(R_AARCH64_TLSLD_MOVW_G1, 0x208)
ELF_RELOC(R_AARCH64_TLSLD_MOVW_G0_NC, 0x209)
ELF_RELOC(R_AARCH64_TLSLD_LD_PREL19, 0x20a)
ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G2, 0x20b)
ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G1, 0x20c)
ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, 0x20d)
ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G0, 0x20e)
ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, 0x20f)
ELF_RELOC(R_AARCH64_TLSLD_ADD_DTPREL_HI12, 0x210)
ELF_RELOC(R_AARCH64_TLSLD_ADD_DTPREL_LO12, 0x211)
ELF_RELOC(R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, 0x212)
ELF_RELOC(R_AARCH64_TLSLD_LDST8_DTPREL_LO12, 0x213)
ELF_RELOC(R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, 0x214)
ELF_RELOC(R_AARCH64_TLSLD_LDST16_DTPREL_LO12, 0x215)
ELF_RELOC(R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, 0x216)
ELF_RELOC(R_AARCH64_TLSLD_LDST32_DTPREL_LO12, 0x217)
ELF_RELOC(R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, 0x218)
ELF_RELOC(R_AARCH64_TLSLD_LDST64_DTPREL_LO12, 0x219)
ELF_RELOC(R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, 0x21a)
ELF_RELOC(R_AARCH64_TLSIE_MOVW_GOTTPREL_G1, 0x21b)
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)
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)
ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G0, 0x223)
ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G0_NC, 0x224)
ELF_RELOC(R_AARCH64_TLSLE_ADD_TPREL_HI12, 0x225)
ELF_RELOC(R_AARCH64_TLSLE_ADD_TPREL_LO12, 0x226)
ELF_RELOC(R_AARCH64_TLSLE_ADD_TPREL_LO12_NC, 0x227)
ELF_RELOC(R_AARCH64_TLSLE_LDST8_TPREL_LO12, 0x228)
ELF_RELOC(R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, 0x229)
ELF_RELOC(R_AARCH64_TLSLE_LDST16_TPREL_LO12, 0x22a)
ELF_RELOC(R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, 0x22b)
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)
ELF_RELOC(R_AARCH64_TLSDESC_LD_PREL19, 0x230)
ELF_RELOC(R_AARCH64_TLSDESC_ADR_PREL21, 0x231)
ELF_RELOC(R_AARCH64_TLSDESC_ADR_PAGE21, 0x232)
ELF_RELOC(R_AARCH64_TLSDESC_LD64_LO12_NC, 0x233)
ELF_RELOC(R_AARCH64_TLSDESC_ADD_LO12_NC, 0x234)
ELF_RELOC(R_AARCH64_TLSDESC_OFF_G1, 0x235)
ELF_RELOC(R_AARCH64_TLSDESC_OFF_G0_NC, 0x236)
ELF_RELOC(R_AARCH64_TLSDESC_LDR, 0x237)
ELF_RELOC(R_AARCH64_TLSDESC_ADD, 0x238)
ELF_RELOC(R_AARCH64_TLSDESC_CALL, 0x239)
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)
ELF_RELOC(R_AARCH64_COPY, 0x400)
ELF_RELOC(R_AARCH64_GLOB_DAT, 0x401)
ELF_RELOC(R_AARCH64_JUMP_SLOT, 0x402)
ELF_RELOC(R_AARCH64_RELATIVE, 0x403)
ELF_RELOC(R_AARCH64_TLS_DTPREL64, 0x404)
ELF_RELOC(R_AARCH64_TLS_DTPMOD64, 0x405)
ELF_RELOC(R_AARCH64_TLS_TPREL64, 0x406)
ELF_RELOC(R_AARCH64_TLSDESC, 0x407)
ELF_RELOC(R_AARCH64_IRELATIVE, 0x408)