[llvm] r221074 - Update test to use llvm-readobj. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Sat Nov 1 18:12:03 PDT 2014
Author: rafael
Date: Sat Nov 1 20:12:02 2014
New Revision: 221074
URL: http://llvm.org/viewvc/llvm-project?rev=221074&view=rev
Log:
Update test to use llvm-readobj. NFC.
Modified:
llvm/trunk/test/MC/MachO/darwin-x86_64-diff-reloc-assign-2.s
Modified: llvm/trunk/test/MC/MachO/darwin-x86_64-diff-reloc-assign-2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/darwin-x86_64-diff-reloc-assign-2.s?rev=221074&r1=221073&r2=221074&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/darwin-x86_64-diff-reloc-assign-2.s (original)
+++ llvm/trunk/test/MC/MachO/darwin-x86_64-diff-reloc-assign-2.s Sat Nov 1 20:12:02 2014
@@ -1,38 +1,18 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
-
-// Test case for rdar://9356266
-
-// This tests that this expression does not cause a crash and produces these
-// four relocation entries:
-// Relocation information (__DATA,__data) 4 entries
-// address pcrel length extern type scattered symbolnum/value
-// 00000004 False long False SUB False 2 (__DATA,__data)
-// 00000004 False long False UNSIGND False 2 (__DATA,__data)
-// 00000000 False long False SUB False 2 (__DATA,__data)
-// 00000000 False long False UNSIGND False 2 (__DATA,__data)
+// RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
.data
L_var1:
L_var2:
-// This was working fine
.long L_var2 - L_var1
-
.set L_var3, .
.set L_var4, .
-// But this was causing a crash
.long L_var4 - L_var3
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0x4),
-// CHECK: ('word-1', 0x54000002)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0x4),
-// CHECK: ('word-1', 0x4000002)),
-// CHECK: # Relocation 2
-// CHECK: (('word-0', 0x0),
-// CHECK: ('word-1', 0x54000002)),
-// CHECK: # Relocation 3
-// CHECK: (('word-0', 0x0),
-// CHECK: ('word-1', 0x4000002)),
-// CHECK: ])
+// CHECK: Relocations [
+// CHECK-NEXT: Section __data {
+// CHECK-NEXT: 0x4 0 2 0 X86_64_RELOC_SUBTRACTOR 0 0x2
+// CHECK-NEXT: 0x4 0 2 0 X86_64_RELOC_UNSIGNED 0 0x2
+// CHECK-NEXT: 0x0 0 2 0 X86_64_RELOC_SUBTRACTOR 0 0x2
+// CHECK-NEXT: 0x0 0 2 0 X86_64_RELOC_UNSIGNED 0 0x2
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
More information about the llvm-commits
mailing list