aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorPeter Smith <peter.smith@linaro.org>2017-05-18 09:12:21 +0000
committerPeter Smith <peter.smith@linaro.org>2017-05-18 09:12:21 +0000
commitd54f368e6ae2b4dde45b78f1e4222ad710f469ad (patch)
treeb3408db4e9f16853c04fefecf62787efbd87befc /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent627ad0fec3d0050331e99fa7a67f0dfeb0ade108 (diff)
downloadllvm-d54f368e6ae2b4dde45b78f1e4222ad710f469ad.zip
llvm-d54f368e6ae2b4dde45b78f1e4222ad710f469ad.tar.gz
llvm-d54f368e6ae2b4dde45b78f1e4222ad710f469ad.tar.bz2
[ELF] Support R_ARM_SBREL32 Relocation
This change adds support for the R_ARM_SBREL32 relocation. The relocation is a base relative relocation that is produced by clang/llvm when -frwpi is used. The use case for the -frwpi option is position independent data for embedded systems that do not have a GOT. With -frwpi all data is accessed via an offset from a base register (usually r9), where r9 is set at run time to where the data has been loaded. The base of the data is known as the static base. The ARM ABI defines the static base as: B(S) is the addressing origin of the output segment defining the symbol S. The origin is not required to be the base address of the segment. For simplicity we choose to use the base address of the segment. The ARM procedure call standard only defines a read write variant using R_ARM_SBREL32 relocations. The read-only data is accessed via pc-relative offsets from the code, this is implemented in clang as -fropi. Fixes PR32924 Differential Revision: https://reviews.llvm.org/D33280 llvm-svn: 303337
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions