From 4ca9a2a0adf01ae1aaad2c7fa499501b58183991 Mon Sep 17 00:00:00 2001 From: Tom Roeder Date: Wed, 30 Oct 2013 18:47:25 +0000 Subject: 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 --- test/MC/ELF/relocation.s | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'test/MC/ELF') 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: } -- cgit v1.2.3