[PATCH] llvm - more AArch64 relocations added
Paul Osmialowski
pawelo at king.net.pl
Sun Jul 13 10:39:21 PDT 2014
I've found that ELF.h file lacks few AArch64 relocations listed here (and other places I can easily google): http://code.metager.de/source/xref/gnu/grub/include/grub/elf.h
http://reviews.llvm.org/D4488
Files:
include/llvm/Support/ELF.h
lib/Object/ELF.cpp
test/tools/llvm-readobj/Inputs/relocs.py
test/tools/llvm-readobj/reloc-types.test
Index: include/llvm/Support/ELF.h
===================================================================
--- include/llvm/Support/ELF.h
+++ include/llvm/Support/ELF.h
@@ -668,7 +668,16 @@
R_AARCH64_TLSDESC_LD64_LO12_NC = 0x233,
R_AARCH64_TLSDESC_ADD_LO12_NC = 0x234,
- R_AARCH64_TLSDESC_CALL = 0x239
+ R_AARCH64_TLSDESC_CALL = 0x239,
+
+ R_AARCH64_COPY = 0x400,
+ R_AARCH64_GLOB_DAT = 0x401,
+ R_AARCH64_JUMP_SLOT = 0x402,
+ R_AARCH64_RELATIVE = 0x403,
+ R_AARCH64_TLS_DTPMOD64 = 0x404,
+ R_AARCH64_TLS_DTPREL64 = 0x405,
+ R_AARCH64_TLS_TPREL64 = 0x406,
+ R_AARCH64_TLSDESC = 0x407
};
// ARM Specific e_flags
Index: lib/Object/ELF.cpp
===================================================================
--- lib/Object/ELF.cpp
+++ lib/Object/ELF.cpp
@@ -266,6 +266,14 @@
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_TLSDESC_LD64_LO12_NC);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_TLSDESC_ADD_LO12_NC);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_TLSDESC_CALL);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_COPY);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_GLOB_DAT);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_JUMP_SLOT);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_RELATIVE);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_TLS_DTPMOD64);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_TLS_DTPREL64);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_TLS_TPREL64);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_AARCH64_TLSDESC);
default:
break;
}
Index: test/tools/llvm-readobj/Inputs/relocs.py
===================================================================
--- test/tools/llvm-readobj/Inputs/relocs.py
+++ test/tools/llvm-readobj/Inputs/relocs.py
@@ -660,6 +660,14 @@
R_AARCH64_TLSDESC_LD64_LO12_NC = 0x233
R_AARCH64_TLSDESC_ADD_LO12_NC = 0x234
R_AARCH64_TLSDESC_CALL = 0x239
+ R_AARCH64_COPY = 0x400
+ R_AARCH64_GLOB_DAT = 0x401
+ R_AARCH64_JUMP_SLOT = 0x402
+ R_AARCH64_RELATIVE = 0x403
+ R_AARCH64_TLS_DTPMOD64 = 0x404
+ R_AARCH64_TLS_DTPREL64 = 0x405
+ R_AARCH64_TLS_TPREL64 = 0x406
+ R_AARCH64_TLSDESC = 0x407
class Relocs_Elf_ARM(Enum):
R_ARM_NONE = 0x00
Index: test/tools/llvm-readobj/reloc-types.test
===================================================================
--- test/tools/llvm-readobj/reloc-types.test
+++ test/tools/llvm-readobj/reloc-types.test
@@ -222,6 +222,14 @@
ELF-AARCH64: Type: R_AARCH64_TLSDESC_LD64_LO12_NC (563)
ELF-AARCH64: Type: R_AARCH64_TLSDESC_ADD_LO12_NC (564)
ELF-AARCH64: Type: R_AARCH64_TLSDESC_CALL (569)
+ELF-AARCH64: Type: R_AARCH64_COPY (1024)
+ELF-AARCH64: Type: R_AARCH64_GLOB_DAT (1025)
+ELF-AARCH64: Type: R_AARCH64_JUMP_SLOT (1026)
+ELF-AARCH64: Type: R_AARCH64_RELATIVE (1027)
+ELF-AARCH64: Type: R_AARCH64_TLS_DTPMOD64 (1028)
+ELF-AARCH64: Type: R_AARCH64_TLS_DTPREL64 (1029)
+ELF-AARCH64: Type: R_AARCH64_TLS_TPREL64 (1030)
+ELF-AARCH64: Type: R_AARCH64_TLSDESC (1031)
ELF-ARM: Type: R_ARM_NONE (0)
ELF-ARM: Type: R_ARM_PC24 (1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4488.11354.patch
Type: text/x-patch
Size: 3371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140713/86306f4b/attachment.bin>
More information about the llvm-commits
mailing list