mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
static __global int Var = 0;
__global int* Ptr[] = {&Var};
...
In this case Var is a non premptable symbol and so its address can be used as the value of Ptr, with a base relative relocation that will add the delta between the ELF address and the actual load address. Such relocations do not require a symbol.
Differential Revision: https://reviews.llvm.org/D38909
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315935 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
555 B
Modula-2
18 lines
555 B
Modula-2
#ifndef ELF_RELOC
|
|
#error "ELF_RELOC must be defined"
|
|
#endif
|
|
|
|
ELF_RELOC(R_AMDGPU_NONE, 0)
|
|
ELF_RELOC(R_AMDGPU_ABS32_LO, 1)
|
|
ELF_RELOC(R_AMDGPU_ABS32_HI, 2)
|
|
ELF_RELOC(R_AMDGPU_ABS64, 3)
|
|
ELF_RELOC(R_AMDGPU_REL32, 4)
|
|
ELF_RELOC(R_AMDGPU_REL64, 5)
|
|
ELF_RELOC(R_AMDGPU_ABS32, 6)
|
|
ELF_RELOC(R_AMDGPU_GOTPCREL, 7)
|
|
ELF_RELOC(R_AMDGPU_GOTPCREL32_LO, 8)
|
|
ELF_RELOC(R_AMDGPU_GOTPCREL32_HI, 9)
|
|
ELF_RELOC(R_AMDGPU_REL32_LO, 10)
|
|
ELF_RELOC(R_AMDGPU_REL32_HI, 11)
|
|
ELF_RELOC(R_AMDGPU_RELATIVE64, 13)
|