[llvm] r224973 - Convert test to llvm-readobj. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Mon Dec 29 17:34:06 PST 2014
Author: rafael
Date: Mon Dec 29 19:34:06 2014
New Revision: 224973
URL: http://llvm.org/viewvc/llvm-project?rev=224973&view=rev
Log:
Convert test to llvm-readobj. NFC.
Modified:
llvm/trunk/test/MC/MachO/AArch64/darwin-ARM64-reloc.s
Modified: llvm/trunk/test/MC/MachO/AArch64/darwin-ARM64-reloc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/AArch64/darwin-ARM64-reloc.s?rev=224973&r1=224972&r2=224973&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/AArch64/darwin-ARM64-reloc.s (original)
+++ llvm/trunk/test/MC/MachO/AArch64/darwin-ARM64-reloc.s Mon Dec 29 19:34:06 2014
@@ -1,4 +1,4 @@
-; RUN: llvm-mc -n -triple arm64-apple-darwin10 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+; RUN: llvm-mc -n -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s
.text
_fred:
@@ -29,129 +29,216 @@ _data:
.long _foo at got - .
-; CHECK: ('cputype', 16777228)
-; CHECK: ('cpusubtype', 0)
-; CHECK: ('filetype', 1)
-; CHECK: ('num_load_commands', 3)
-; CHECK: ('load_commands_size', 336)
-; CHECK: ('flag', 0)
-; CHECK: ('reserved', 0)
-; CHECK: ('load_commands', [
-; CHECK: # Load Command 0
-; CHECK: (('command', 25)
-; CHECK: ('size', 232)
-; CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-; CHECK: ('vm_addr', 0)
-; CHECK: ('vm_size', 84)
-; CHECK: ('file_offset', 368)
-; CHECK: ('file_size', 84)
-; CHECK: ('maxprot', 7)
-; CHECK: ('initprot', 7)
-; CHECK: ('num_sections', 2)
-; CHECK: ('flags', 0)
-; CHECK: ('sections', [
-; CHECK: # Section 0
-; CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-; CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-; CHECK: ('address', 0)
-; CHECK: ('size', 36)
-; CHECK: ('offset', 368)
-; CHECK: ('alignment', 0)
-; CHECK: ('reloc_offset', 452)
-; CHECK: ('num_reloc', 13)
-; CHECK: ('flags', 0x80000400)
-; CHECK: ('reserved1', 0)
-; CHECK: ('reserved2', 0)
-; CHECK: ('reserved3', 0)
-; CHECK: ),
-; CHECK: ('_relocations', [
-; CHECK: # Relocation 0
-; CHECK: (('word-0', 0x20),
-; CHECK: ('word-1', 0x6c000005)),
-; CHECK: # Relocation 1
-; CHECK: (('word-0', 0x1c),
-; CHECK: ('word-1', 0x5d000005)),
-; CHECK: # Relocation 2
-; CHECK: (('word-0', 0x18),
-; CHECK: ('word-1', 0xa4000004)),
-; CHECK: # Relocation 3
-; CHECK: (('word-0', 0x18),
-; CHECK: ('word-1', 0x4c000002)),
-; CHECK: # Relocation 4
-; CHECK: (('word-0', 0x14),
-; CHECK: ('word-1', 0xa4000001)),
-; CHECK: # Relocation 5
-; CHECK: (('word-0', 0x14),
-; CHECK: ('word-1', 0x3d000002)),
-; CHECK: # Relocation 6
-; CHECK: (('word-0', 0x10),
-; CHECK: ('word-1', 0xa4000004)),
-; CHECK: # Relocation 7
-; CHECK: (('word-0', 0x10),
-; CHECK: ('word-1', 0x4c000002)),
-; CHECK: # Relocation 8
-; CHECK: (('word-0', 0xc),
-; CHECK: ('word-1', 0x4c000002)),
-; CHECK: # Relocation 9
-; CHECK: (('word-0', 0x8),
-; CHECK: ('word-1', 0x3d000002)),
-; CHECK: # Relocation 10
-; CHECK: (('word-0', 0x4),
-; CHECK: ('word-1', 0xa4000014)),
-; CHECK: # Relocation 11
-; CHECK: (('word-0', 0x4),
-; CHECK: ('word-1', 0x2d000007)),
-; CHECK: # Relocation 12
-; CHECK: (('word-0', 0x0),
-; CHECK: ('word-1', 0x2d000007)),
-; CHECK: ])
-; CHECK: ('_section_data', '00000094 00000094 03000090 620040b9 63000091 03000090 620040b9 03000090 620040b9')
-; CHECK: # Section 1
-; CHECK: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-; CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-; CHECK: ('address', 36)
-; CHECK: ('size', 48)
-; CHECK: ('offset', 404)
-; CHECK: ('alignment', 0)
-; CHECK: ('reloc_offset', 556)
-; CHECK: ('num_reloc', 10)
-; CHECK: ('flags', 0x0)
-; CHECK: ('reserved1', 0)
-; CHECK: ('reserved2', 0)
-; CHECK: ('reserved3', 0)
-; CHECK: ),
-; CHECK: ('_relocations', [
-; CHECK: # Relocation 0
-; CHECK: (('word-0', 0x2c),
-; CHECK: ('word-1', 0x7d000006)),
-; CHECK: # Relocation 1
-; CHECK: (('word-0', 0x24),
-; CHECK: ('word-1', 0x7e000006)),
-; CHECK: # Relocation 2
-; CHECK: (('word-0', 0x20),
-; CHECK: ('word-1', 0x1c000004)),
-; CHECK: # Relocation 3
-; CHECK: (('word-0', 0x20),
-; CHECK: ('word-1', 0xc000006)),
-; CHECK: # Relocation 4
-; CHECK: (('word-0', 0x18),
-; CHECK: ('word-1', 0x1e000004)),
-; CHECK: # Relocation 5
-; CHECK: (('word-0', 0x18),
-; CHECK: ('word-1', 0xe000006)),
-; CHECK: # Relocation 6
-; CHECK: (('word-0', 0x10),
-; CHECK: ('word-1', 0x1e000004)),
-; CHECK: # Relocation 7
-; CHECK: (('word-0', 0x10),
-; CHECK: ('word-1', 0xe000006)),
-; CHECK: # Relocation 8
-; CHECK: (('word-0', 0x8),
-; CHECK: ('word-1', 0xe000006)),
-; CHECK: # Relocation 9
-; CHECK: (('word-0', 0x0),
-; CHECK: ('word-1', 0xe000006)),
-; CHECK: ])
-; CHECK: ('_section_data', '00000000 00000000 04000000 00000000 00000000 00000000 04000000 00000000 00000000 00000000 00000000 d4ffffff')
-; CHECK: ])
-; CHECK: ),
+; CHECK: Relocations [
+; CHECK-NEXT: Section __text {
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x20
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_GOT_LOAD_PAGEOFF12 (6)
+; CHECK-NEXT: Symbol: _data_ext
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x1C
+; CHECK-NEXT: PCRel: 1
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_GOT_LOAD_PAGE21 (5)
+; CHECK-NEXT: Symbol: _data_ext
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x18
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 0
+; CHECK-NEXT: Type: ARM64_RELOC_ADDEND (10)
+; CHECK-NEXT: Symbol: 0x4
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x18
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_PAGEOFF12 (4)
+; CHECK-NEXT: Symbol: _data
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x14
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 0
+; CHECK-NEXT: Type: ARM64_RELOC_ADDEND (10)
+; CHECK-NEXT: Symbol: 0x1
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x14
+; CHECK-NEXT: PCRel: 1
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_PAGE21 (3)
+; CHECK-NEXT: Symbol: _data
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x10
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 0
+; CHECK-NEXT: Type: ARM64_RELOC_ADDEND (10)
+; CHECK-NEXT: Symbol: 0x4
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x10
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_PAGEOFF12 (4)
+; CHECK-NEXT: Symbol: _data
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0xC
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_PAGEOFF12 (4)
+; CHECK-NEXT: Symbol: _data
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x8
+; CHECK-NEXT: PCRel: 1
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_PAGE21 (3)
+; CHECK-NEXT: Symbol: _data
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x4
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 0
+; CHECK-NEXT: Type: ARM64_RELOC_ADDEND (10)
+; CHECK-NEXT: Symbol: 0x14
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x4
+; CHECK-NEXT: PCRel: 1
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_BRANCH26 (2)
+; CHECK-NEXT: Symbol: _func
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x0
+; CHECK-NEXT: PCRel: 1
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_BRANCH26 (2)
+; CHECK-NEXT: Symbol: _func
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: }
+; CHECK-NEXT: Section __data {
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x2C
+; CHECK-NEXT: PCRel: 1
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_POINTER_TO_GOT (7)
+; CHECK-NEXT: Symbol: _foo
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x24
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 3
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_POINTER_TO_GOT (7)
+; CHECK-NEXT: Symbol: _foo
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x20
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_SUBTRACTOR (1)
+; CHECK-NEXT: Symbol: _bar
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x20
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 2
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
+; CHECK-NEXT: Symbol: _foo
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x18
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 3
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_SUBTRACTOR (1)
+; CHECK-NEXT: Symbol: _bar
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x18
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 3
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
+; CHECK-NEXT: Symbol: _foo
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x10
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 3
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_SUBTRACTOR (1)
+; CHECK-NEXT: Symbol: _bar
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x10
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 3
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
+; CHECK-NEXT: Symbol: _foo
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x8
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 3
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
+; CHECK-NEXT: Symbol: _foo
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: Relocation {
+; CHECK-NEXT: Offset: 0x0
+; CHECK-NEXT: PCRel: 0
+; CHECK-NEXT: Length: 3
+; CHECK-NEXT: Extern: 1
+; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
+; CHECK-NEXT: Symbol: _foo
+; CHECK-NEXT: Scattered: 0
+; CHECK-NEXT: }
+; CHECK-NEXT: }
+; CHECK-NEXT: ]
More information about the llvm-commits
mailing list