summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/Inputs/relocs.py
diff options
context:
space:
mode:
authorPeter Smith <peter.smith@linaro.org>2019-07-31 14:42:57 +0000
committerPeter Smith <peter.smith@linaro.org>2019-07-31 14:42:57 +0000
commite314a128a9d6dbe5d0f7eb9c5d48b5f6f0b82c11 (patch)
tree5d2975430e89e641df5d5f392b7f9e3dfe39ca81 /llvm/test/tools/llvm-readobj/Inputs/relocs.py
parent0707f66ad0afba012cd2e573c924a1712109aa04 (diff)
downloadbcm5719-llvm-e314a128a9d6dbe5d0f7eb9c5d48b5f6f0b82c11.tar.gz
bcm5719-llvm-e314a128a9d6dbe5d0f7eb9c5d48b5f6f0b82c11.zip
[AARCH64] Switch relocations R_AARCH64_TLS_TPREL64 and R_AARCH64_DTPMOD64
The ELF for the Arm 64-bit Architecture document originally specified R_AARCH64_TLS_DTPREL64 = 0x404 R_AARCH64_TLS_DTPMOD64 = 0x405 LLVM correctly followed the document. Unfortunately in binutils these two codes were reversed: R_AARCH64_TLS_DTPMOD64 = 0x404 R_AARCH64_TLS_DTPREL64 = 0x405 Given that binaries had shipped this change has become the defacto standard interpretation of these relocation codes for any toolchain that wanted to remain compatible with GNU. To recognize this the latest version of the ABI document has renamed the relocations to R_AARCH64_TLS_IMPDEF1 and R_AARCH64_TLS_IMPDEF2 permitting a toolchain to choose between the two relocation types, and recommending that toolchains follow the GNU interpretation for maximum compatibility. Given that upstream llvm has never implemented the standard TLS model for AArch64 so we have no binary legacy, synchronize with GCC so that we don't create incompatible objects in the future. So far the only visible change is in llvm-readobj as it can decode these relocations. Tthis change will mean that llvm-readobj decodes the same way as GNU readelf. fixes PR40507 llvm-svn: 367437
Diffstat (limited to 'llvm/test/tools/llvm-readobj/Inputs/relocs.py')
-rw-r--r--llvm/test/tools/llvm-readobj/Inputs/relocs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/tools/llvm-readobj/Inputs/relocs.py b/llvm/test/tools/llvm-readobj/Inputs/relocs.py
index 8e621cef5cd..d0a7341dcb6 100644
--- a/llvm/test/tools/llvm-readobj/Inputs/relocs.py
+++ b/llvm/test/tools/llvm-readobj/Inputs/relocs.py
@@ -710,8 +710,8 @@ class Relocs_Elf_AArch64(Enum):
R_AARCH64_GLOB_DAT = 0x401
R_AARCH64_JUMP_SLOT = 0x402
R_AARCH64_RELATIVE = 0x403
- R_AARCH64_TLS_DTPREL64 = 0x404
- R_AARCH64_TLS_DTPMOD64 = 0x405
+ R_AARCH64_TLS_DTPMOD64 = 0x404
+ R_AARCH64_TLS_DTPREL64 = 0x405
R_AARCH64_TLS_TPREL64 = 0x406
R_AARCH64_TLSDESC = 0x407
R_AARCH64_IRELATIVE = 0x408
OpenPOWER on IntegriCloud