summaryrefslogtreecommitdiff
path: root/test/MC/ELF
diff options
context:
space:
mode:
authorTom Roeder <tmroeder@google.com>2013-10-30 18:47:25 +0000
committerTom Roeder <tmroeder@google.com>2013-10-30 18:47:25 +0000
commit4ca9a2a0adf01ae1aaad2c7fa499501b58183991 (patch)
tree8e7def5375f343b1abd86bbc9cf52616920198af /test/MC/ELF
parentf34c3ca3046378bdb7e49b7366bafca0e0bafb9a (diff)
downloadllvm-4ca9a2a0adf01ae1aaad2c7fa499501b58183991.tar.gz
llvm-4ca9a2a0adf01ae1aaad2c7fa499501b58183991.tar.bz2
llvm-4ca9a2a0adf01ae1aaad2c7fa499501b58183991.tar.xz
This commit adds some (but not all) of the x86-64 relocations that are not
currently supported in the ELF object writer, along with a simple test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ELF')
-rw-r--r--test/MC/ELF/relocation.s16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s
index ba50c8182f..682307501d 100644
--- a/test/MC/ELF/relocation.s
+++ b/test/MC/ELF/relocation.s
@@ -14,6 +14,8 @@ bar:
leaq foo@TPOFF(%rax), %rax # R_X86_64_TPOFF32
leaq foo@TLSLD(%rip), %rdi # R_X86_64_TLSLD
leaq foo@dtpoff(%rax), %rcx # R_X86_64_DTPOFF32
+ movabs foo@GOT, %rax # R_X86_64_GOT64
+ movabs foo@GOTOFF, %rax # R_X86_64_GOTOFF64
pushq $bar
movq foo(%rip), %rdx
leaq foo-bar(%r14),%r14
@@ -35,12 +37,14 @@ bar:
// CHECK-NEXT: 0x3B R_X86_64_TPOFF32 foo 0x0
// CHECK-NEXT: 0x42 R_X86_64_TLSLD foo 0xFFFFFFFFFFFFFFFC
// CHECK-NEXT: 0x49 R_X86_64_DTPOFF32 foo 0x0
-// CHECK-NEXT: 0x4E R_X86_64_32S .text 0x0
-// CHECK-NEXT: 0x55 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC
-// CHECK-NEXT: 0x5C R_X86_64_PC32 foo 0x5C
-// CHECK-NEXT: 0x63 R_X86_64_32S .text 0x0
-// CHECK-NEXT: 0x67 R_X86_64_DTPOFF64 foo 0x0
-// CHECK-NEXT: 0x71 R_X86_64_TPOFF64 baz 0x0
+// CHECK-NEXT: 0x4F R_X86_64_GOT64 foo 0x0
+// CHECK-NEXT: 0x59 R_X86_64_GOTOFF64 foo 0x0
+// CHECK-NEXT: 0x62 R_X86_64_32S .text 0x0
+// CHECK-NEXT: 0x69 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: 0x70 R_X86_64_PC32 foo 0x70
+// CHECK-NEXT: 0x77 R_X86_64_32S .text 0x0
+// CHECK-NEXT: 0x7B R_X86_64_DTPOFF64 foo 0x0
+// CHECK-NEXT: 0x85 R_X86_64_TPOFF64 baz 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: }