summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-09-15 13:30:08 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-09-15 13:30:08 +0000
commitd1062bbd893a43004a19a65c414b0453cf3ca04d (patch)
tree272e2e1fb64b027e73bce7237a326ec990aa84e8
parent172cc32ef3d3b33d413f3dc9896c50677b65fd45 (diff)
downloadbcm5719-llvm-d1062bbd893a43004a19a65c414b0453cf3ca04d.tar.gz
bcm5719-llvm-d1062bbd893a43004a19a65c414b0453cf3ca04d.zip
Make this test a bit more robust in preparation to adding more cases.
The first test (call) is now the only test to use .text, which makes it resistant to more tests being added. llvm-objdump -d already prints the addresses of symbols. We can use that in the tests. llvm-svn: 247685
-rw-r--r--lld/test/elf2/relocation.s27
1 files changed, 17 insertions, 10 deletions
diff --git a/lld/test/elf2/relocation.s b/lld/test/elf2/relocation.s
index da0b1836a87..14751d34bb5 100644
--- a/lld/test/elf2/relocation.s
+++ b/lld/test/elf2/relocation.s
@@ -1,6 +1,6 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
// RUN: lld -flavor gnu2 %t -o %t2
-// RUN: llvm-objdump -t -d %t2 | FileCheck %s
+// RUN: llvm-objdump -d %t2 | FileCheck %s
// REQUIRES: x86
@@ -13,17 +13,24 @@ _start:
.zero 4
.global lulz
lulz:
+ nop
+
+// CHECK: Disassembly of section .text:
+// CHECK-NEXT: _start:
+// CHECK-NEXT: 11000: e8 04 00 00 00 callq 4
+// CHECK-NEXT: 11005:
+
+// CHECK: lulz:
+// CHECK-NEXT: 11009: 90 nop
+
.global bar
-.text
+.section .text2,"ax",@progbits
bar:
movl $bar, %edx // R_X86_64_32
-// R_X86_64_32
-// CHECK: bar:
-// CHECK: 11000: ba 00 10 01 00 movl $69632, %edx
-
-// CHECK: e8 04 00 00 00 callq 4
-
-// Also check that symbols match.
-// CHECK: 0000000000011000 .text 00000000 bar
+// FIXME: this would be far more self evident if llvm-objdump printed
+// constants in hex.
+// CHECK: Disassembly of section .text2:
+// CHECK-NEXT: bar:
+// CHECK-NEXT: 12000: {{.*}} movl $73728, %edx
OpenPOWER on IntegriCloud