aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-11-14 23:53:26 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-11-14 23:53:26 +0000
commit1f52dfe69ee7d0a49a6bfe6dfec6aeb8e416e313 (patch)
treeedc3fb5275b68c11e3d721e75dbffed028cae34f /test/MC
parentb908258d59745ab9f150c66f94541951cf9c9211 (diff)
downloadexternal_llvm-1f52dfe69ee7d0a49a6bfe6dfec6aeb8e416e313.zip
external_llvm-1f52dfe69ee7d0a49a6bfe6dfec6aeb8e416e313.tar.gz
external_llvm-1f52dfe69ee7d0a49a6bfe6dfec6aeb8e416e313.tar.bz2
Move the logic to decide with which symbol we produce a relocation (if any) to
a central location. This also makes us a bit more compatible with gas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/ELF/alias-reloc.s24
1 files changed, 17 insertions, 7 deletions
diff --git a/test/MC/ELF/alias-reloc.s b/test/MC/ELF/alias-reloc.s
index e31afa1..352a2a2 100644
--- a/test/MC/ELF/alias-reloc.s
+++ b/test/MC/ELF/alias-reloc.s
@@ -1,16 +1,26 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
-// Test that this produces a R_X86_64_PLT32. We produce a relocation with foo
-// and gas with bar, but both should be OK as long as the type is correct.
+// Test that this produces a R_X86_64_PLT32 with bar.
+
.globl foo
foo:
bar = foo
+ .section zed, "", @progbits
call bar@PLT
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym',
+// CHECK: # Symbol 0x00000001
+// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000000)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000001)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
+// CHECK-NEXT: ),
+
+// CHECK: # Relocation 0x00000000
+// CHECK-NEXT: (('r_offset', 0x00000001)
+// CHECK-NEXT: ('r_sym', 0x00000001)
// CHECK-NEXT: ('r_type', 0x00000004)
-// CHECK-NEXT: ('r_addend',
+// CHECK-NEXT: ('r_addend', 0xfffffffc)
// CHECK-NEXT: ),
-// CHECK-NEXT: ])