aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ELF
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-10-18 16:38:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-10-18 16:38:04 +0000
commitc97f80efc80030c7544a9903c79d2dccd197a0ff (patch)
tree18614412c7fa58b3d9aea9782e27c2ca24bedfac /test/MC/ELF
parentc0c7c2b6061e7ca2d528bbedadb1bea0561c9158 (diff)
downloadexternal_llvm-c97f80efc80030c7544a9903c79d2dccd197a0ff.zip
external_llvm-c97f80efc80030c7544a9903c79d2dccd197a0ff.tar.gz
external_llvm-c97f80efc80030c7544a9903c79d2dccd197a0ff.tar.bz2
Handle GOTOFF correctly on i386.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ELF')
-rw-r--r--test/MC/ELF/relocation-386.s20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/MC/ELF/relocation-386.s b/test/MC/ELF/relocation-386.s
new file mode 100644
index 0000000..e65adcc
--- /dev/null
+++ b/test/MC/ELF/relocation-386.s
@@ -0,0 +1,20 @@
+// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+
+// Test that we produce a GOTOFF and that the relocation uses the symbol and not
+// the section.
+
+
+// CHECK: # Symbol 1
+// CHECK-NEXT: (('st_name', 5) # '.Lfoo'
+
+// CHECK: # Relocation 0
+// CHECK-NEXT: (('r_offset', 2)
+// CHECK-NEXT: ('r_sym', 1)
+// CHECK-NEXT: ('r_type', 9)
+
+ .text
+bar:
+ leal .Lfoo@GOTOFF(%ebx), %eax
+ .section .rodata.str1.16,"aMS",@progbits,1
+.Lfoo:
+ .asciz "bool llvm::llvm_start_multithreaded()"