diff options
author | Tony Tye <Tony.Tye@amd.com> | 2017-10-16 20:44:29 +0000 |
---|---|---|
committer | Tony Tye <Tony.Tye@amd.com> | 2017-10-16 20:44:29 +0000 |
commit | 300ec0aaa2686ee1d51fab1a4a484819248deae0 (patch) | |
tree | e89d477b105a7d8d4599f0a56eef3393d3961f3d /test/Object/AMDGPU | |
parent | 38df9eeb4398a0c7b9b581a8778f9e260c7aeca1 (diff) |
Add base relative relocation record that can be used for the following case (OpenCL example):
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
Diffstat (limited to 'test/Object/AMDGPU')
-rw-r--r-- | test/Object/AMDGPU/elf64-relocs.yaml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Object/AMDGPU/elf64-relocs.yaml b/test/Object/AMDGPU/elf64-relocs.yaml index 541119852af..bc6c2b89d5f 100644 --- a/test/Object/AMDGPU/elf64-relocs.yaml +++ b/test/Object/AMDGPU/elf64-relocs.yaml @@ -15,6 +15,7 @@ # CHECK: 0x18 R_AMDGPU_GOTPCREL32_HI - 0x0 # CHECK: 0x20 R_AMDGPU_REL32_LO - 0x0 # CHECK: 0x22 R_AMDGPU_REL32_HI - 0x0 +# CHECK: 0x24 R_AMDGPU_RELATIVE64 - 0x0 # CHECK: } # CHECK: ] @@ -72,6 +73,9 @@ Sections: - Offset: 0x22 Symbol: s11 Type: R_AMDGPU_REL32_HI + - Offset: 0x24 + Symbol: s12 + Type: R_AMDGPU_RELATIVE64 Symbols: Local: |