summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTony Tye <Tony.Tye@amd.com>2017-10-16 20:44:29 +0000
committerTony Tye <Tony.Tye@amd.com>2017-10-16 20:44:29 +0000
commit300ec0aaa2686ee1d51fab1a4a484819248deae0 (patch)
treee89d477b105a7d8d4599f0a56eef3393d3961f3d /docs
parent38df9eeb4398a0c7b9b581a8778f9e260c7aeca1 (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 'docs')
-rw-r--r--docs/AMDGPUUsage.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/AMDGPUUsage.rst b/docs/AMDGPUUsage.rst
index 8b94a3e6a5a..35611bc6fcd 100644
--- a/docs/AMDGPUUsage.rst
+++ b/docs/AMDGPUUsage.rst
@@ -684,7 +684,12 @@ Following notations are used for specifying relocation calculations:
**S**
Represents the value of the symbol whose index resides in the relocation
- entry.
+ entry. Relocations not using this must specify a symbol index of ``STN_UNDEF``.
+
+**B**
+ Represents the base address of a loaded executable or shared object which is
+ the difference between the ELF address and the actual load address. Relocations
+ using this are only valid in executable or shared objects.
The following relocation types are supported:
@@ -706,6 +711,8 @@ The following relocation types are supported:
``R_AMDGPU_GOTPCREL32_HI`` 9 ``word32`` (G + GOT + A - P) >> 32
``R_AMDGPU_REL32_LO`` 10 ``word32`` (S + A - P) & 0xFFFFFFFF
``R_AMDGPU_REL32_HI`` 11 ``word32`` (S + A - P) >> 32
+ *reserved* 12
+ ``R_AMDGPU_RELATIVE64`` 13 ``word64`` B + A
========================== ===== ========== ==============================
.. _amdgpu-dwarf: