summaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-05-19 20:32:34 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-05-19 20:32:34 +0000
commita3bff99f0a325092dc1227c036f5def4aa1b9bb5 (patch)
tree54cdc169d410e929e0741131c001fc50f6d62487 /test/MC
parenta1a7ba838230b4b77604cc9a9fbd22f40f354ba2 (diff)
downloadllvm-a3bff99f0a325092dc1227c036f5def4aa1b9bb5.tar.gz
llvm-a3bff99f0a325092dc1227c036f5def4aa1b9bb5.tar.bz2
llvm-a3bff99f0a325092dc1227c036f5def4aa1b9bb5.tar.xz
ADD64ri32 sign extends its argument, so we need to use a R_X86_64_32S.
Fixes PR9934. We really need to start tblgening the relocation info :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/ELF/relocation.s7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s
index 4df09e13fc..2760232a5a 100644
--- a/test/MC/ELF/relocation.s
+++ b/test/MC/ELF/relocation.s
@@ -17,6 +17,7 @@ bar:
pushq $bar
movq foo(%rip), %rdx
leaq foo-bar(%r14),%r14
+ addq $bar,%rax # R_X86_64_32S
// CHECK: # Section 0x00000001
@@ -106,6 +107,12 @@ bar:
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000005c)
+// CHECK: # Relocation 0x0000000e
+// CHECK-NEXT: (('r_offset', 0x00000063)
+// CHECK-NEXT: ('r_sym', 0x00000002)
+// CHECK-NEXT: ('r_type', 0x0000000b)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+
// CHECK: # Symbol 0x00000002
// CHECK: (('st_name', 0x00000000) # ''
// CHECK: ('st_bind', 0x00000000)