[llvm] r247235 - [MC] Convert all the remaining tests from macho-dump to llvm-readobj.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 18:50:00 PDT 2015
Author: davide
Date: Wed Sep 9 20:50:00 2015
New Revision: 247235
URL: http://llvm.org/viewvc/llvm-project?rev=247235&view=rev
Log:
[MC] Convert all the remaining tests from macho-dump to llvm-readobj.
This sort-of deprecates macho-dump. It may take still a little while
to garbage collect it, but at least there's no real usage of it in
the tree anymore. New tests should always rely on llvm-readobj or
llvm-objdump.
Modified:
llvm/trunk/test/MC/MachO/ARM/darwin-ARM-reloc.s
llvm/trunk/test/MC/MachO/ARM/darwin-Thumb-reloc.s
llvm/trunk/test/MC/MachO/ARM/thumb-bl-jbits.s
llvm/trunk/test/MC/MachO/absolute.s
llvm/trunk/test/MC/MachO/absolutize.s
llvm/trunk/test/MC/MachO/comm-1.s
llvm/trunk/test/MC/MachO/darwin-complex-difference.s
llvm/trunk/test/MC/MachO/darwin-x86_64-diff-relocs.s
llvm/trunk/test/MC/MachO/darwin-x86_64-nobase-relocs.s
llvm/trunk/test/MC/MachO/darwin-x86_64-reloc-offsets.s
llvm/trunk/test/MC/MachO/data.s
llvm/trunk/test/MC/MachO/diff-with-two-sections.s
llvm/trunk/test/MC/MachO/direction_labels.s
llvm/trunk/test/MC/MachO/indirect-symbols.s
llvm/trunk/test/MC/MachO/jcc.s
llvm/trunk/test/MC/MachO/lcomm-attributes.s
llvm/trunk/test/MC/MachO/pcrel-to-other-section.s
llvm/trunk/test/MC/MachO/relax-jumps.s
llvm/trunk/test/MC/MachO/section-align-1.s
llvm/trunk/test/MC/MachO/section-align-2.s
llvm/trunk/test/MC/MachO/string-table.s
llvm/trunk/test/MC/MachO/symbol-diff.s
llvm/trunk/test/MC/MachO/symbol-flags.s
llvm/trunk/test/MC/MachO/symbol-indirect.s
llvm/trunk/test/MC/MachO/symbols-1.s
llvm/trunk/test/MC/MachO/tbss.s
llvm/trunk/test/MC/MachO/tdata.s
llvm/trunk/test/MC/MachO/thread_init_func.s
llvm/trunk/test/MC/MachO/tls.s
llvm/trunk/test/MC/MachO/tlv-bss.ll
llvm/trunk/test/MC/MachO/tlv-reloc.s
llvm/trunk/test/MC/MachO/tlv.s
llvm/trunk/test/MC/MachO/values.s
llvm/trunk/test/MC/MachO/variable-exprs.s
llvm/trunk/test/MC/MachO/weakdef.s
llvm/trunk/test/MC/MachO/x86-data-in-code.ll
llvm/trunk/test/MC/MachO/x86_32-optimal_nop.s
Modified: llvm/trunk/test/MC/MachO/ARM/darwin-ARM-reloc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/ARM/darwin-ARM-reloc.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/ARM/darwin-ARM-reloc.s (original)
+++ llvm/trunk/test/MC/MachO/ARM/darwin-ARM-reloc.s Wed Sep 9 20:50:00 2015
@@ -1,5 +1,5 @@
@ RUN: llvm-mc -n -triple armv7-apple-darwin10 %s -filetype=obj -o %t.obj
-@ RUN: macho-dump --dump-section-data < %t.obj > %t.dump
+@ RUN: llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols < %t.obj > %t.dump
@ RUN: FileCheck < %t.dump %s
.syntax unified
@@ -21,153 +21,166 @@ Lsc0_0:
.subsections_via_symbols
-@ CHECK: ('cputype', 12)
-@ CHECK: ('cpusubtype', 9)
-@ CHECK: ('filetype', 1)
-@ CHECK: ('num_load_commands', 4)
-@ CHECK: ('load_commands_size', 380)
-@ CHECK: ('flag', 8192)
-@ CHECK: ('load_commands', [
-@ CHECK: # Load Command 0
-@ CHECK: (('command', 1)
-@ CHECK: ('size', 260)
-@ 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', 16)
-@ CHECK: ('file_offset', 408)
-@ CHECK: ('file_size', 16)
-@ CHECK: ('maxprot', 7)
-@ CHECK: ('initprot', 7)
-@ CHECK: ('num_sections', 3)
-@ 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', 8)
-@ CHECK: ('offset', 408)
-@ CHECK: ('alignment', 0)
-@ CHECK: ('reloc_offset', 424)
-@ CHECK: ('num_reloc', 2)
-@ CHECK: ('flags', 0x80000400)
-@ CHECK: ('reserved1', 0)
-@ CHECK: ('reserved2', 0)
-@ CHECK: ),
-@ CHECK: ('_relocations', [
-@ CHECK: # Relocation 0
-@ CHECK: (('word-0', 0x4),
-@ CHECK: ('word-1', 0x55000001)),
-@ CHECK: # Relocation 1
-@ CHECK: (('word-0', 0x0),
-@ CHECK: ('word-1', 0x5d000003)),
-@ CHECK: ])
-@ CHECK: ('_section_data', 'feffffeb fdffffeb')
-@ 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', 8)
-@ CHECK: ('size', 4)
-@ CHECK: ('offset', 416)
-@ CHECK: ('alignment', 0)
-@ CHECK: ('reloc_offset', 440)
-@ CHECK: ('num_reloc', 2)
-@ CHECK: ('flags', 0x0)
-@ CHECK: ('reserved1', 0)
-@ CHECK: ('reserved2', 0)
-@ CHECK: ),
-@ CHECK: ('_relocations', [
-@ CHECK: # Relocation 0
-@ CHECK: (('word-0', 0xa2000000),
-@ CHECK: ('word-1', 0xc)),
-@ CHECK: # Relocation 1
-@ CHECK: (('word-0', 0xa1000000),
-@ CHECK: ('word-1', 0x8)),
-@ CHECK: ])
-@ CHECK: ('_section_data', '04000000')
-@ CHECK: # Section 2
-@ CHECK: (('section_name', '__cstring\x00\x00\x00\x00\x00\x00\x00')
-@ CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-@ CHECK: ('address', 12)
-@ CHECK: ('size', 4)
-@ CHECK: ('offset', 420)
-@ CHECK: ('alignment', 0)
-@ CHECK: ('reloc_offset', 0)
-@ CHECK: ('num_reloc', 0)
-@ CHECK: ('flags', 0x2)
-@ CHECK: ('reserved1', 0)
-@ CHECK: ('reserved2', 0)
-@ CHECK: ),
-@ CHECK: ('_relocations', [
-@ CHECK: ])
-@ CHECK: ('_section_data', '00000000')
-@ CHECK: ])
-@ CHECK: ),
-@ CHECK: # Load Command 2
-@ CHECK: (('command', 2)
-@ CHECK: ('size', 24)
-@ CHECK: ('symoff', 456)
-@ CHECK: ('nsyms', 4)
-@ CHECK: ('stroff', 504)
-@ CHECK: ('strsize', 24)
-@ CHECK: ('_string_data', '\x00_printf\x00_f1\x00_f0\x00_d0\x00\x00\x00\x00')
-@ CHECK: ('_symbols', [
-@ CHECK: # Symbol 0
-@ CHECK: (('n_strx', 13)
-@ CHECK: ('n_type', 0xe)
-@ CHECK: ('n_sect', 1)
-@ CHECK: ('n_desc', 0)
-@ CHECK: ('n_value', 0)
-@ CHECK: ('_string', '_f0')
-@ CHECK: ),
-@ CHECK: # Symbol 1
-@ CHECK: (('n_strx', 9)
-@ CHECK: ('n_type', 0xe)
-@ CHECK: ('n_sect', 1)
-@ CHECK: ('n_desc', 0)
-@ CHECK: ('n_value', 4)
-@ CHECK: ('_string', '_f1')
-@ CHECK: ),
-@ CHECK: # Symbol 2
-@ CHECK: (('n_strx', 17)
-@ CHECK: ('n_type', 0xe)
-@ CHECK: ('n_sect', 2)
-@ CHECK: ('n_desc', 0)
-@ CHECK: ('n_value', 8)
-@ CHECK: ('_string', '_d0')
-@ CHECK: ),
-@ CHECK: # Symbol 3
-@ CHECK: (('n_strx', 1)
-@ CHECK: ('n_type', 0x1)
-@ CHECK: ('n_sect', 0)
-@ CHECK: ('n_desc', 0)
-@ CHECK: ('n_value', 0)
-@ CHECK: ('_string', '_printf')
-@ CHECK: ),
-@ CHECK: ])
-@ CHECK: ),
-@ CHECK: # Load Command 3
-@ CHECK: (('command', 11)
-@ CHECK: ('size', 80)
-@ CHECK: ('ilocalsym', 0)
-@ CHECK: ('nlocalsym', 3)
-@ CHECK: ('iextdefsym', 3)
-@ CHECK: ('nextdefsym', 0)
-@ CHECK: ('iundefsym', 3)
-@ CHECK: ('nundefsym', 1)
-@ CHECK: ('tocoff', 0)
-@ CHECK: ('ntoc', 0)
-@ CHECK: ('modtaboff', 0)
-@ CHECK: ('nmodtab', 0)
-@ CHECK: ('extrefsymoff', 0)
-@ CHECK: ('nextrefsyms', 0)
-@ CHECK: ('indirectsymoff', 0)
-@ CHECK: ('nindirectsyms', 0)
-@ CHECK: ('extreloff', 0)
-@ CHECK: ('nextrel', 0)
-@ CHECK: ('locreloff', 0)
-@ CHECK: ('nlocrel', 0)
-@ CHECK: ('_indirect_symbols', [
-@ CHECK: ])
-@ CHECK: ),
-@ CHECK: ])
+@ CHECK: File: <stdin>
+@ CHECK: Format: Mach-O arm
+@ CHECK: Arch: arm
+@ CHECK: AddressSize: 32bit
+@ CHECK: MachHeader {
+@ CHECK: Magic: Magic (0xFEEDFACE)
+@ CHECK: CpuType: Arm (0xC)
+@ CHECK: CpuSubType: CPU_SUBTYPE_ARM_V7 (0x9)
+@ CHECK: FileType: Relocatable (0x1)
+@ CHECK: NumOfLoadCommands: 4
+@ CHECK: SizeOfLoadCommands: 380
+@ CHECK: Flags [ (0x2000)
+@ CHECK: MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
+@ CHECK: ]
+@ CHECK: }
+@ CHECK: Sections [
+@ CHECK: Section {
+@ CHECK: Index: 0
+@ CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+@ CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+@ CHECK: Address: 0x0
+@ CHECK: Size: 0x8
+@ CHECK: Offset: 408
+@ CHECK: Alignment: 0
+@ CHECK: RelocationOffset: 0x1A8
+@ CHECK: RelocationCount: 2
+@ CHECK: Type: 0x0
+@ CHECK: Attributes [ (0x800004)
+@ CHECK: PureInstructions (0x800000)
+@ CHECK: SomeInstructions (0x4)
+@ CHECK: ]
+@ CHECK: Reserved1: 0x0
+@ CHECK: Reserved2: 0x0
+@ CHECK: SectionData (
+@ CHECK: 0000: FEFFFFEB FDFFFFEB |........|
+@ CHECK: )
+@ CHECK: }
+@ CHECK: Section {
+@ CHECK: Index: 1
+@ CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+@ CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+@ CHECK: Address: 0x8
+@ CHECK: Size: 0x4
+@ CHECK: Offset: 416
+@ CHECK: Alignment: 0
+@ CHECK: RelocationOffset: 0x1B8
+@ CHECK: RelocationCount: 2
+@ CHECK: Type: 0x0
+@ CHECK: Attributes [ (0x0)
+@ CHECK: ]
+@ CHECK: Reserved1: 0x0
+@ CHECK: Reserved2: 0x0
+@ CHECK: SectionData (
+@ CHECK: 0000: 04000000 |....|
+@ CHECK: )
+@ CHECK: }
+@ CHECK: Section {
+@ CHECK: Index: 2
+@ CHECK: Name: __cstring (5F 5F 63 73 74 72 69 6E 67 00 00 00 00 00 00 00)
+@ CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+@ CHECK: Address: 0xC
+@ CHECK: Size: 0x4
+@ CHECK: Offset: 420
+@ CHECK: Alignment: 0
+@ CHECK: RelocationOffset: 0x0
+@ CHECK: RelocationCount: 0
+@ CHECK: Type: ExtReloc (0x2)
+@ CHECK: Attributes [ (0x0)
+@ CHECK: ]
+@ CHECK: Reserved1: 0x0
+@ CHECK: Reserved2: 0x0
+@ CHECK: SectionData (
+@ CHECK: 0000: 00000000 |....|
+@ CHECK: )
+@ CHECK: }
+@ CHECK: ]
+@ CHECK: Relocations [
+@ CHECK: Section __text {
+@ CHECK: 0x4 1 2 0 ARM_RELOC_BR24 0 __text
+@ CHECK: 0x0 1 2 1 ARM_RELOC_BR24 0 _printf
+@ CHECK: }
+@ CHECK: Section __data {
+@ CHECK: 0x0 0 2 n/a ARM_RELOC_SECTDIFF 1 0xC
+@ CHECK: 0x0 0 2 n/a ARM_RELOC_PAIR 1 0x8
+@ CHECK: }
+@ CHECK: ]
+@ CHECK: Symbols [
+@ CHECK: Symbol {
+@ CHECK: Name: _f0 (13)
+@ CHECK: Type: Section (0xE)
+@ CHECK: Section: __text (0x1)
+@ CHECK: RefType: UndefinedNonLazy (0x0)
+@ CHECK: Flags [ (0x0)
+@ CHECK: ]
+@ CHECK: Value: 0x0
+@ CHECK: }
+@ CHECK: Symbol {
+@ CHECK: Name: _f1 (9)
+@ CHECK: Type: Section (0xE)
+@ CHECK: Section: __text (0x1)
+@ CHECK: RefType: UndefinedNonLazy (0x0)
+@ CHECK: Flags [ (0x0)
+@ CHECK: ]
+@ CHECK: Value: 0x4
+@ CHECK: }
+@ CHECK: Symbol {
+@ CHECK: Name: _d0 (17)
+@ CHECK: Type: Section (0xE)
+@ CHECK: Section: __data (0x2)
+@ CHECK: RefType: UndefinedNonLazy (0x0)
+@ CHECK: Flags [ (0x0)
+@ CHECK: ]
+@ CHECK: Value: 0x8
+@ CHECK: }
+@ CHECK: Symbol {
+@ CHECK: Name: _printf (1)
+@ CHECK: Extern
+@ CHECK: Type: Undef (0x0)
+@ CHECK: Section: (0x0)
+@ CHECK: RefType: UndefinedNonLazy (0x0)
+@ CHECK: Flags [ (0x0)
+@ CHECK: ]
+@ CHECK: Value: 0x0
+@ CHECK: }
+@ CHECK: ]
+@ CHECK: Indirect Symbols {
+@ CHECK: Number: 0
+@ CHECK: Symbols [
+@ CHECK: ]
+@ CHECK: }
+@ CHECK: Segment {
+@ CHECK: Cmd: LC_SEGMENT
+@ CHECK: Name:
+@ CHECK: Size: 260
+@ CHECK: vmaddr: 0x0
+@ CHECK: vmsize: 0x10
+@ CHECK: fileoff: 408
+@ CHECK: filesize: 16
+@ CHECK: maxprot: rwx
+@ CHECK: initprot: rwx
+@ CHECK: nsects: 3
+@ CHECK: flags: 0x0
+@ CHECK: }
+@ CHECK: Dysymtab {
+@ CHECK: ilocalsym: 0
+@ CHECK: nlocalsym: 3
+@ CHECK: iextdefsym: 3
+@ CHECK: nextdefsym: 0
+@ CHECK: iundefsym: 3
+@ CHECK: nundefsym: 1
+@ CHECK: tocoff: 0
+@ CHECK: ntoc: 0
+@ CHECK: modtaboff: 0
+@ CHECK: nmodtab: 0
+@ CHECK: extrefsymoff: 0
+@ CHECK: nextrefsyms: 0
+@ CHECK: indirectsymoff: 0
+@ CHECK: nindirectsyms: 0
+@ CHECK: extreloff: 0
+@ CHECK: nextrel: 0
+@ CHECK: locreloff: 0
+@ CHECK: nlocrel: 0
+@ CHECK: }
Modified: llvm/trunk/test/MC/MachO/ARM/darwin-Thumb-reloc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/ARM/darwin-Thumb-reloc.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/ARM/darwin-Thumb-reloc.s (original)
+++ llvm/trunk/test/MC/MachO/ARM/darwin-Thumb-reloc.s Wed Sep 9 20:50:00 2015
@@ -1,5 +1,5 @@
@ RUN: llvm-mc -n -triple thumbv7-apple-darwin10 %s -filetype=obj -o %t.obj
-@ RUN: macho-dump --dump-section-data < %t.obj > %t.dump
+@ RUN: llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols < %t.obj > %t.dump
@ RUN: FileCheck < %t.dump %s
.syntax unified
@@ -22,118 +22,127 @@ L_.str:
.subsections_via_symbols
-@ CHECK: ('cputype', 12)
-@ CHECK: ('cpusubtype', 9)
-@ CHECK: ('filetype', 1)
-@ CHECK: ('num_load_commands', 4)
-@ CHECK: ('load_commands_size', 312)
-@ CHECK: ('flag', 8192)
-@ CHECK: ('load_commands', [
-@ CHECK: # Load Command 0
-@ CHECK: (('command', 1)
-@ CHECK: ('size', 192)
-@ 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', 11)
-@ CHECK: ('file_offset', 340)
-@ CHECK: ('file_size', 11)
-@ 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', 8)
-@ CHECK: ('offset', 340)
-@ CHECK: ('alignment', 2)
-@ CHECK: ('reloc_offset', 352)
-@ CHECK: ('num_reloc', 3)
-@ CHECK: ('flags', 0x80000400)
-@ CHECK: ('reserved1', 0)
-@ CHECK: ('reserved2', 0)
-@ CHECK: ),
-@ CHECK: ('_relocations', [
-@ CHECK: # Relocation 0
-@ CHECK: (('word-0', 0xa2000004),
-@ CHECK: ('word-1', 0x8)),
-@ CHECK: # Relocation 1
-@ CHECK: (('word-0', 0xa1000000),
-@ CHECK: ('word-1', 0x0)),
-@ CHECK: # Relocation 2
-@ CHECK: (('word-0', 0x0),
-@ CHECK: ('word-1', 0x6d000001)),
-@ CHECK: ])
-@ CHECK-FIXME: ('_section_data', 'fff7feef 04000000')
-@ CHECK: # Section 1
-@ CHECK: (('section_name', '__cstring\x00\x00\x00\x00\x00\x00\x00')
-@ CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-@ CHECK: ('address', 8)
-@ CHECK: ('size', 3)
-@ CHECK: ('offset', 348)
-@ CHECK: ('alignment', 2)
-@ CHECK: ('reloc_offset', 0)
-@ CHECK: ('num_reloc', 0)
-@ CHECK: ('flags', 0x2)
-@ CHECK: ('reserved1', 0)
-@ CHECK: ('reserved2', 0)
-@ CHECK: ),
-@ CHECK: ('_relocations', [
-@ CHECK: ])
-@ CHECK: ('_section_data', '733000')
-@ CHECK: ])
-@ CHECK: ),
-@ CHECK: # Load Command 2
-@ CHECK: (('command', 2)
-@ CHECK: ('size', 24)
-@ CHECK: ('symoff', 376)
-@ CHECK: ('nsyms', 2)
-@ CHECK: ('stroff', 400)
-@ CHECK: ('strsize', 16)
-@ CHECK: ('_string_data', '\x00_main\x00_printf\x00\x00')
-@ CHECK: ('_symbols', [
-@ CHECK: # Symbol 0
-@ CHECK: (('n_strx', 1)
-@ CHECK: ('n_type', 0xf)
-@ CHECK: ('n_sect', 1)
-@ CHECK: ('n_desc', 8)
-@ CHECK: ('n_value', 0)
-@ CHECK: ('_string', '_main')
-@ CHECK: ),
-@ CHECK: # Symbol 1
-@ CHECK: (('n_strx', 7)
-@ CHECK: ('n_type', 0x1)
-@ CHECK: ('n_sect', 0)
-@ CHECK: ('n_desc', 0)
-@ CHECK: ('n_value', 0)
-@ CHECK: ('_string', '_printf')
-@ CHECK: ),
-@ CHECK: ])
-@ CHECK: ),
-@ CHECK: # Load Command 3
-@ CHECK: (('command', 11)
-@ CHECK: ('size', 80)
-@ CHECK: ('ilocalsym', 0)
-@ CHECK: ('nlocalsym', 0)
-@ CHECK: ('iextdefsym', 0)
-@ CHECK: ('nextdefsym', 1)
-@ CHECK: ('iundefsym', 1)
-@ CHECK: ('nundefsym', 1)
-@ CHECK: ('tocoff', 0)
-@ CHECK: ('ntoc', 0)
-@ CHECK: ('modtaboff', 0)
-@ CHECK: ('nmodtab', 0)
-@ CHECK: ('extrefsymoff', 0)
-@ CHECK: ('nextrefsyms', 0)
-@ CHECK: ('indirectsymoff', 0)
-@ CHECK: ('nindirectsyms', 0)
-@ CHECK: ('extreloff', 0)
-@ CHECK: ('nextrel', 0)
-@ CHECK: ('locreloff', 0)
-@ CHECK: ('nlocrel', 0)
-@ CHECK: ('_indirect_symbols', [
-@ CHECK: ])
-@ CHECK: ),
-@ CHECK: ])
+@ CHECK: File: <stdin>
+@ CHECK: Format: Mach-O arm
+@ CHECK: Arch: arm
+@ CHECK: AddressSize: 32bit
+@ CHECK: MachHeader {
+@ CHECK: Magic: Magic (0xFEEDFACE)
+@ CHECK: CpuType: Arm (0xC)
+@ CHECK: CpuSubType: CPU_SUBTYPE_ARM_V7 (0x9)
+@ CHECK: FileType: Relocatable (0x1)
+@ CHECK: NumOfLoadCommands: 4
+@ CHECK: SizeOfLoadCommands: 312
+@ CHECK: Flags [ (0x2000)
+@ CHECK: MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
+@ CHECK: ]
+@ CHECK: }
+@ CHECK: Sections [
+@ CHECK: Section {
+@ CHECK: Index: 0
+@ CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+@ CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+@ CHECK: Address: 0x0
+@ CHECK: Size: 0x8
+@ CHECK: Offset: 340
+@ CHECK: Alignment: 2
+@ CHECK: RelocationOffset: 0x160
+@ CHECK: RelocationCount: 3
+@ CHECK: Type: 0x0
+@ CHECK: Attributes [ (0x800004)
+@ CHECK: PureInstructions (0x800000)
+@ CHECK: SomeInstructions (0x4)
+@ CHECK: ]
+@ CHECK: Reserved1: 0x0
+@ CHECK: Reserved2: 0x0
+@ CHECK: SectionData (
+@ CHECK: 0000: FFF7FEEF 04000000 |........|
+@ CHECK: )
+@ CHECK: }
+@ CHECK: Section {
+@ CHECK: Index: 1
+@ CHECK: Name: __cstring (5F 5F 63 73 74 72 69 6E 67 00 00 00 00 00 00 00)
+@ CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+@ CHECK: Address: 0x8
+@ CHECK: Size: 0x3
+@ CHECK: Offset: 348
+@ CHECK: Alignment: 2
+@ CHECK: RelocationOffset: 0x0
+@ CHECK: RelocationCount: 0
+@ CHECK: Type: ExtReloc (0x2)
+@ CHECK: Attributes [ (0x0)
+@ CHECK: ]
+@ CHECK: Reserved1: 0x0
+@ CHECK: Reserved2: 0x0
+@ CHECK: SectionData (
+@ CHECK: 0000: 733000 |s0.|
+@ CHECK: )
+@ CHECK: }
+@ CHECK: ]
+@ CHECK: Relocations [
+@ CHECK: Section __text {
+@ CHECK: 0x4 0 2 n/a ARM_RELOC_SECTDIFF 1 0x8
+@ CHECK: 0x0 0 2 n/a ARM_RELOC_PAIR 1 0x0
+@ CHECK: 0x0 1 2 1 ARM_THUMB_RELOC_BR22 0 _printf
+@ CHECK: }
+@ CHECK: ]
+@ CHECK: Symbols [
+@ CHECK: Symbol {
+@ CHECK: Name: _main (1)
+@ CHECK: Extern
+@ CHECK: Type: Section (0xE)
+@ CHECK: Section: __text (0x1)
+@ CHECK: RefType: 0x8
+@ CHECK: Flags [ (0x0)
+@ CHECK: ]
+@ CHECK: Value: 0x0
+@ CHECK: }
+@ CHECK: Symbol {
+@ CHECK: Name: _printf (7)
+@ CHECK: Extern
+@ CHECK: Type: Undef (0x0)
+@ CHECK: Section: (0x0)
+@ CHECK: RefType: UndefinedNonLazy (0x0)
+@ CHECK: Flags [ (0x0)
+@ CHECK: ]
+@ CHECK: Value: 0x0
+@ CHECK: }
+@ CHECK: ]
+@ CHECK: Indirect Symbols {
+@ CHECK: Number: 0
+@ CHECK: Symbols [
+@ CHECK: ]
+@ CHECK: }
+@ CHECK: Segment {
+@ CHECK: Cmd: LC_SEGMENT
+@ CHECK: Name:
+@ CHECK: Size: 192
+@ CHECK: vmaddr: 0x0
+@ CHECK: vmsize: 0xB
+@ CHECK: fileoff: 340
+@ CHECK: filesize: 11
+@ CHECK: maxprot: rwx
+@ CHECK: initprot: rwx
+@ CHECK: nsects: 2
+@ CHECK: flags: 0x0
+@ CHECK: }
+@ CHECK: Dysymtab {
+@ CHECK: ilocalsym: 0
+@ CHECK: nlocalsym: 0
+@ CHECK: iextdefsym: 0
+@ CHECK: nextdefsym: 1
+@ CHECK: iundefsym: 1
+@ CHECK: nundefsym: 1
+@ CHECK: tocoff: 0
+@ CHECK: ntoc: 0
+@ CHECK: modtaboff: 0
+@ CHECK: nmodtab: 0
+@ CHECK: extrefsymoff: 0
+@ CHECK: nextrefsyms: 0
+@ CHECK: indirectsymoff: 0
+@ CHECK: nindirectsyms: 0
+@ CHECK: extreloff: 0
+@ CHECK: nextrel: 0
+@ CHECK: locreloff: 0
+@ CHECK: nlocrel: 0
+@ CHECK: }
Modified: llvm/trunk/test/MC/MachO/ARM/thumb-bl-jbits.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/ARM/thumb-bl-jbits.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/ARM/thumb-bl-jbits.s (original)
+++ llvm/trunk/test/MC/MachO/ARM/thumb-bl-jbits.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-@ RUN: llvm-mc -triple=thumbv7-apple-darwin -filetype=obj -o - < %s | macho-dump --dump-section-data | FileCheck %s
+@ RUN: llvm-mc -triple=thumbv7-apple-darwin -filetype=obj -o - < %s | llvm-readobj -s -sd | FileCheck %s
.thumb
.thumb_func t
t: nop
@@ -11,9 +11,17 @@ t: nop
.thumb_func b
b:
bl t
-# CHECK: '_section_data', 'c3f7fcf5'
# We are checking that the branch and link instruction which is:
# bl #-4441096
# has it displacement encoded correctly with respect to the J1 and J2 bits when
# the branch is assembled with a label not a displacement.
# rdar://10149689
+
+# CHECK: Section {
+# CHECK: Index: 2
+# CHECK: Name: __branch (5F 5F 62 72 61 6E 63 68 00 00 00 00 00 00 00 00)
+# CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+# CHECK: SectionData (
+# CHECK: 0000: C3F7FCF5 |....|
+# CHECK: )
+# CHECK: }
Modified: llvm/trunk/test/MC/MachO/absolute.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/absolute.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/absolute.s (original)
+++ llvm/trunk/test/MC/MachO/absolute.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
_bar:
nop
@@ -17,142 +17,159 @@ foo_equals2 = (_foo - _bar + 0xffff0000)
.globl foo_set2_global;
.set foo_set2_global, (_foo - _bar + 0xffff0000)
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 272)
-// CHECK: ('flag', 0)
-// CHECK: ('reserved', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 25)
-// CHECK: ('size', 152)
-// 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', 2)
-// CHECK: ('file_offset', 304)
-// CHECK: ('file_size', 2)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 1)
-// 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', 2)
-// CHECK: ('offset', 304)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 308)
-// CHECK: ('nsyms', 8)
-// CHECK: ('stroff', 436)
-// CHECK: ('strsize', 84)
-// CHECK: ('_string_data', '\x00foo_equals\x00_bar\x00_foo\x00foo_set2_global\x00foo_set1_global\x00foo_set2\x00foo_equals2\x00foo_set1\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 12)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_bar')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 17)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 1)
-// CHECK: ('_string', '_foo')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 75)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 4294901761)
-// CHECK: ('_string', 'foo_set1')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 54)
-// CHECK: ('n_type', 0x2)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 4294901761)
-// CHECK: ('_string', 'foo_set2')
-// CHECK: ),
-// CHECK: # Symbol 4
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 4294901761)
-// CHECK: ('_string', 'foo_equals')
-// CHECK: ),
-// CHECK: # Symbol 5
-// CHECK: (('n_strx', 63)
-// CHECK: ('n_type', 0x2)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 4294901761)
-// CHECK: ('_string', 'foo_equals2')
-// CHECK: ),
-// CHECK: # Symbol 6
-// CHECK: (('n_strx', 38)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 4294901761)
-// CHECK: ('_string', 'foo_set1_global')
-// CHECK: ),
-// CHECK: # Symbol 7
-// CHECK: (('n_strx', 22)
-// CHECK: ('n_type', 0x3)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 4294901761)
-// CHECK: ('_string', 'foo_set2_global')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 6)
-// CHECK: ('iextdefsym', 6)
-// CHECK: ('nextdefsym', 2)
-// CHECK: ('iundefsym', 8)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 272
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x2
+// CHECK: Offset: 304
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _bar (12)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _foo (17)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x1
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: foo_set1 (75)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0xFFFF0001
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: foo_set2 (54)
+// CHECK: Type: Abs (0x2)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0xFFFF0001
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: foo_equals (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0xFFFF0001
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: foo_equals2 (63)
+// CHECK: Type: Abs (0x2)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0xFFFF0001
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: foo_set1_global (38)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0xFFFF0001
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: foo_set2_global (22)
+// CHECK: Extern
+// CHECK: Type: Abs (0x2)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0xFFFF0001
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 152
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x2
+// CHECK: fileoff: 304
+// CHECK: filesize: 2
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 1
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 6
+// CHECK: iextdefsym: 6
+// CHECK: nextdefsym: 2
+// CHECK: iundefsym: 8
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/absolutize.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/absolutize.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/absolutize.s (original)
+++ llvm/trunk/test/MC/MachO/absolutize.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
_text_a:
xorl %eax,%eax
@@ -47,143 +47,151 @@ Ldata_expr_2 = Ldata_d - Ldata_c
.long _data_a + Ldata_expr_0
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 312)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 192)
-// 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', 87)
-// CHECK: ('file_offset', 340)
-// CHECK: ('file_size', 87)
-// 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', 43)
-// CHECK: ('offset', 340)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 428)
-// CHECK: ('num_reloc', 3)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0xa0000027),
-// CHECK: ('word-1', 0x0)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0xa4000009),
-// CHECK: ('word-1', 0x0)),
-// CHECK: # Relocation 2
-// CHECK: (('word-0', 0xa1000000),
-// CHECK: ('word-1', 0x2)),
-// CHECK: ])
-// CHECK: ('_section_data', '31c031c0 31c031c0 b8feffff ffb8feff ffffb802 000000b8 02000000 b8020000 00b80200 0000b8fe ffffff')
-// 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', 43)
-// CHECK: ('size', 44)
-// CHECK: ('offset', 383)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 452)
-// CHECK: ('num_reloc', 3)
-// CHECK: ('flags', 0x0)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0xa0000028),
-// CHECK: ('word-1', 0x2b)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0xa4000010),
-// CHECK: ('word-1', 0x2b)),
-// CHECK: # Relocation 2
-// CHECK: (('word-0', 0xa1000000),
-// CHECK: ('word-1', 0x2f)),
-// CHECK: ])
-// CHECK: ('_section_data', '00000000 00000000 00000000 00000000 fcffffff fcffffff 04000000 04000000 04000000 04000000 27000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 476)
-// CHECK: ('nsyms', 4)
-// CHECK: ('stroff', 524)
-// CHECK: ('strsize', 36)
-// CHECK: ('_string_data', '\x00_text_b\x00_data_b\x00_text_a\x00_data_a\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 17)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_text_a')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 2)
-// CHECK: ('_string', '_text_b')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 25)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 43)
-// CHECK: ('_string', '_data_a')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 9)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 47)
-// CHECK: ('_string', '_data_b')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 4)
-// CHECK: ('iextdefsym', 4)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 4)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 312
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x2B
+// CHECK: Offset: 340
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x1AC
+// CHECK: RelocationCount: 3
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 31C031C0 31C031C0 B8FEFFFF FFB8FEFF |1.1.1.1.........|
+// CHECK: 0010: FFFFB802 000000B8 02000000 B8020000 |................|
+// CHECK: 0020: 00B80200 0000B8FE FFFFFF |...........|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x2B
+// CHECK: Size: 0x2C
+// CHECK: Offset: 383
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x1C4
+// CHECK: RelocationCount: 3
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0010: FCFFFFFF FCFFFFFF 04000000 04000000 |................|
+// CHECK: 0020: 04000000 04000000 27000000 |........'...|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __text {
+// CHECK: 0x27 0 2 n/a GENERIC_RELOC_VANILLA 1 0x0
+// CHECK: 0x9 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 0x0
+// CHECK: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 0x2
+// CHECK: }
+// CHECK: Section __data {
+// CHECK: 0x28 0 2 n/a GENERIC_RELOC_VANILLA 1 0x2B
+// CHECK: 0x10 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 0x2B
+// CHECK: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 0x2F
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _text_a (17)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _text_b (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x2
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _data_a (25)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x2B
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _data_b (9)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x2F
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 192
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x57
+// CHECK: fileoff: 340
+// CHECK: filesize: 87
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 4
+// CHECK: iextdefsym: 4
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 4
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/comm-1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/comm-1.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/comm-1.s (original)
+++ llvm/trunk/test/MC/MachO/comm-1.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.comm sym_comm_B, 2
.comm sym_comm_A, 4
@@ -7,108 +7,119 @@
.no_dead_strip sym_comm_C
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 244)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 124)
-// 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', 0)
-// CHECK: ('file_offset', 272)
-// CHECK: ('file_size', 0)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 1)
-// 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', 0)
-// CHECK: ('offset', 272)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 272)
-// CHECK: ('nsyms', 4)
-// CHECK: ('stroff', 320)
-// CHECK: ('strsize', 48)
-// CHECK: ('_string_data', '\x00sym_comm_D\x00sym_comm_C\x00sym_comm_B\x00sym_comm_A\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 34)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 4)
-// CHECK: ('_string', 'sym_comm_A')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 23)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 2)
-// CHECK: ('_string', 'sym_comm_B')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 12)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 544)
-// CHECK: ('n_value', 8)
-// CHECK: ('_string', 'sym_comm_C')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 768)
-// CHECK: ('n_value', 2)
-// CHECK: ('_string', 'sym_comm_D')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 0)
-// CHECK: ('iextdefsym', 0)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 0)
-// CHECK: ('nundefsym', 4)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 244
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 272
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: sym_comm_A (34)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x4
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_comm_B (23)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x2
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_comm_C (12)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x220)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x8
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_comm_D (1)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x300)
+// CHECK: ]
+// CHECK: Value: 0x2
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 124
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x0
+// CHECK: fileoff: 272
+// CHECK: filesize: 0
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 1
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 0
+// CHECK: iextdefsym: 0
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 0
+// CHECK: nundefsym: 4
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/darwin-complex-difference.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/darwin-complex-difference.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/darwin-complex-difference.s (original)
+++ llvm/trunk/test/MC/MachO/darwin-complex-difference.s Wed Sep 9 20:50:00 2015
@@ -1,5 +1,5 @@
// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o %t.o
-// RUN: macho-dump --dump-section-data < %t.o > %t.dump
+// RUN: llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols < %t.o > %t.dump
// RUN: FileCheck < %t.dump %s
_a:
@@ -15,115 +15,117 @@ _c:
_d:
.long 0
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 272)
-// CHECK: ('flag', 0)
-// CHECK: ('reserved', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 25)
-// CHECK: ('size', 152)
-// 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', 24)
-// CHECK: ('file_offset', 304)
-// CHECK: ('file_size', 24)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 1)
-// 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', 24)
-// CHECK: ('offset', 304)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 328)
-// CHECK: ('num_reloc', 4)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0xc),
-// CHECK: ('word-1', 0x5c000002)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0xc),
-// CHECK: ('word-1', 0xc000001)),
-// CHECK: # Relocation 2
-// CHECK: (('word-0', 0x8),
-// CHECK: ('word-1', 0x5c000002)),
-// CHECK: # Relocation 3
-// CHECK: (('word-0', 0x8),
-// CHECK: ('word-1', 0xc000001)),
-// CHECK: ])
-// CHECK: ('_section_data', '01000000 02000000 04000000 04000000 00000000 00000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 360)
-// CHECK: ('nsyms', 3)
-// CHECK: ('stroff', 408)
-// CHECK: ('strsize', 12)
-// CHECK: ('_string_data', '\x00_d\x00_c\x00_a\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 7)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_a')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 4)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 16)
-// CHECK: ('_string', '_c')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 20)
-// CHECK: ('_string', '_d')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 3)
-// CHECK: ('iextdefsym', 3)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 3)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 272
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x18
+// CHECK: Offset: 304
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x148
+// CHECK: RelocationCount: 4
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 01000000 02000000 04000000 04000000 |................|
+// CHECK: 0010: 00000000 00000000 |........|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __text {
+// CHECK: 0xC 0 2 1 X86_64_RELOC_SUBTRACTOR 0 _d
+// CHECK: 0xC 0 2 1 X86_64_RELOC_UNSIGNED 0 _c
+// CHECK: 0x8 0 2 1 X86_64_RELOC_SUBTRACTOR 0 _d
+// CHECK: 0x8 0 2 1 X86_64_RELOC_UNSIGNED 0 _c
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _a (7)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _c (4)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x10
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _d (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x14
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 152
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x18
+// CHECK: fileoff: 304
+// CHECK: filesize: 24
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 1
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 3
+// CHECK: iextdefsym: 3
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 3
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/darwin-x86_64-diff-relocs.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/darwin-x86_64-diff-relocs.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/darwin-x86_64-diff-relocs.s (original)
+++ llvm/trunk/test/MC/MachO/darwin-x86_64-diff-relocs.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.text
@@ -117,213 +117,201 @@ _g3:
L3:
xorl %eax,%eax
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 352)
-// 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', 236)
-// CHECK: ('file_offset', 384)
-// CHECK: ('file_size', 236)
-// 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', 94)
-// CHECK: ('offset', 384)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 620)
-// CHECK: ('num_reloc', 12)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-
// FIXME: Unfortunately, we do not get these relocations in exactly the same
// order as Darwin 'as'. It turns out that 'as' *usually* ends up emitting
// them in reverse address order, but sometimes it allocates some
// additional relocations late so these end up precede the other entries. I
// haven't figured out the exact criteria for this yet.
-
-// CHECK: (('word-0', 0x56),
-// CHECK: ('word-1', 0x1d000004)),
-// CHECK: (('word-0', 0x50),
-// CHECK: ('word-1', 0x1d000004)),
-// CHECK: (('word-0', 0x4a),
-// CHECK: ('word-1', 0x1d000003)),
-// CHECK: (('word-0', 0x44),
-// CHECK: ('word-1', 0x1d000003)),
-// CHECK: (('word-0', 0x3e),
-// CHECK: ('word-1', 0x1d000002)),
-// CHECK: (('word-0', 0x38),
-// CHECK: ('word-1', 0x1d000002)),
-// CHECK: (('word-0', 0x20),
-// CHECK: ('word-1', 0x2d000004)),
-// CHECK: (('word-0', 0x1b),
-// CHECK: ('word-1', 0x2d000004)),
-// CHECK: (('word-0', 0x16),
-// CHECK: ('word-1', 0x2d000003)),
-// CHECK: (('word-0', 0x11),
-// CHECK: ('word-1', 0x2d000003)),
-// CHECK: (('word-0', 0xc),
-// CHECK: ('word-1', 0x2d000002)),
-// CHECK: (('word-0', 0x5),
-// CHECK: ('word-1', 0x2d000000)),
-// CHECK: ])
-// 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', 94)
-// CHECK: ('size', 142)
-// CHECK: ('offset', 478)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 716)
-// CHECK: ('num_reloc', 16)
-// CHECK: ('flags', 0x400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0x7a),
-// CHECK: ('word-1', 0x5e000001)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0x7a),
-// CHECK: ('word-1', 0xe000002)),
-// CHECK: # Relocation 2
-// CHECK: (('word-0', 0x72),
-// CHECK: ('word-1', 0x5e000001)),
-// CHECK: # Relocation 3
-// CHECK: (('word-0', 0x72),
-// CHECK: ('word-1', 0xe000002)),
-// CHECK: # Relocation 4
-// CHECK: (('word-0', 0x62),
-// CHECK: ('word-1', 0xe000002)),
-// CHECK: # Relocation 5
-// CHECK: (('word-0', 0x5a),
-// CHECK: ('word-1', 0xe000002)),
-// CHECK: # Relocation 6
-// CHECK: (('word-0', 0x52),
-// CHECK: ('word-1', 0xe000001)),
-// CHECK: # Relocation 7
-// CHECK: (('word-0', 0x4a),
-// CHECK: ('word-1', 0xe000001)),
-// CHECK: # Relocation 8
-// CHECK: (('word-0', 0x3a),
-// CHECK: ('word-1', 0x5e000003)),
-// CHECK: # Relocation 9
-// CHECK: (('word-0', 0x3a),
-// CHECK: ('word-1', 0xe000004)),
-// CHECK: # Relocation 10
-// CHECK: (('word-0', 0x32),
-// CHECK: ('word-1', 0x5e000003)),
-// CHECK: # Relocation 11
-// CHECK: (('word-0', 0x32),
-// CHECK: ('word-1', 0xe000004)),
-// CHECK: # Relocation 12
-// CHECK: (('word-0', 0x22),
-// CHECK: ('word-1', 0xe000004)),
-// CHECK: # Relocation 13
-// CHECK: (('word-0', 0x1a),
-// CHECK: ('word-1', 0xe000004)),
-// CHECK: # Relocation 14
-// CHECK: (('word-0', 0x12),
-// CHECK: ('word-1', 0xe000003)),
-// CHECK: # Relocation 15
-// CHECK: (('word-0', 0xa),
-// CHECK: ('word-1', 0xe000003)),
-// CHECK: ])
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 844)
-// CHECK: ('nsyms', 5)
-// CHECK: ('stroff', 924)
-// CHECK: ('strsize', 24)
-// CHECK: ('_string_data', '\x00_foo\x00_g3\x00_g2\x00_g1\x00_g0\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_foo')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 18)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 2)
-// CHECK: ('_string', '_g0')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 14)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 90)
-// CHECK: ('_string', '_g1')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 10)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 94)
-// CHECK: ('_string', '_g2')
-// CHECK: ),
-// CHECK: # Symbol 4
-// CHECK: (('n_strx', 6)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 232)
-// CHECK: ('_string', '_g3')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 5)
-// CHECK: ('iextdefsym', 5)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 5)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 352
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x5E
+// CHECK: Offset: 384
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x26C
+// CHECK: RelocationCount: 12
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 31C031C0 E9040000 00EBF9E9 00000000 |1.1.............|
+// CHECK: 0010: E9000000 00E90200 0000E900 000000E9 |................|
+// CHECK: 0020: 02000000 89050400 00008905 D2FFFFFF |................|
+// CHECK: 0030: 8905CEFF FFFF8905 00000000 89050200 |................|
+// CHECK: 0040: 00008905 00000000 89050200 00008905 |................|
+// CHECK: 0050: 00000000 89050200 000031C0 31C0 |..........1.1.|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x5E
+// CHECK: Size: 0x8E
+// CHECK: Offset: 478
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x2CC
+// CHECK: RelocationCount: 16
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x4)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 31C00400 00000000 00000000 00000000 |1...............|
+// CHECK: 0010: 00000200 00000000 00000000 00000000 |................|
+// CHECK: 0020: 00000200 00000000 00000200 00000000 |................|
+// CHECK: 0030: 00000000 00000000 00000200 00000000 |................|
+// CHECK: 0040: 00000200 00000000 00000000 00000000 |................|
+// CHECK: 0050: 00000200 00000000 00000000 00000000 |................|
+// CHECK: 0060: 00000200 00000000 00000200 00000000 |................|
+// CHECK: 0070: 00000000 00000000 00000200 00000000 |................|
+// CHECK: 0080: 00000200 00000000 000031C0 31C0 |..........1.1.|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __text {
+// CHECK: 0x56 1 2 1 X86_64_RELOC_SIGNED 0 _g3
+// CHECK: 0x50 1 2 1 X86_64_RELOC_SIGNED 0 _g3
+// CHECK: 0x4A 1 2 1 X86_64_RELOC_SIGNED 0 _g2
+// CHECK: 0x44 1 2 1 X86_64_RELOC_SIGNED 0 _g2
+// CHECK: 0x3E 1 2 1 X86_64_RELOC_SIGNED 0 _g1
+// CHECK: 0x38 1 2 1 X86_64_RELOC_SIGNED 0 _g1
+// CHECK: 0x20 1 2 1 X86_64_RELOC_BRANCH 0 _g3
+// CHECK: 0x1B 1 2 1 X86_64_RELOC_BRANCH 0 _g3
+// CHECK: 0x16 1 2 1 X86_64_RELOC_BRANCH 0 _g2
+// CHECK: 0x11 1 2 1 X86_64_RELOC_BRANCH 0 _g2
+// CHECK: 0xC 1 2 1 X86_64_RELOC_BRANCH 0 _g1
+// CHECK: 0x5 1 2 1 X86_64_RELOC_BRANCH 0 _foo
+// CHECK: }
+// CHECK: Section __data {
+// CHECK: 0x7A 0 3 1 X86_64_RELOC_SUBTRACTOR 0 _g0
+// CHECK: 0x7A 0 3 1 X86_64_RELOC_UNSIGNED 0 _g1
+// CHECK: 0x72 0 3 1 X86_64_RELOC_SUBTRACTOR 0 _g0
+// CHECK: 0x72 0 3 1 X86_64_RELOC_UNSIGNED 0 _g1
+// CHECK: 0x62 0 3 1 X86_64_RELOC_UNSIGNED 0 _g1
+// CHECK: 0x5A 0 3 1 X86_64_RELOC_UNSIGNED 0 _g1
+// CHECK: 0x52 0 3 1 X86_64_RELOC_UNSIGNED 0 _g0
+// CHECK: 0x4A 0 3 1 X86_64_RELOC_UNSIGNED 0 _g0
+// CHECK: 0x3A 0 3 1 X86_64_RELOC_SUBTRACTOR 0 _g2
+// CHECK: 0x3A 0 3 1 X86_64_RELOC_UNSIGNED 0 _g3
+// CHECK: 0x32 0 3 1 X86_64_RELOC_SUBTRACTOR 0 _g2
+// CHECK: 0x32 0 3 1 X86_64_RELOC_UNSIGNED 0 _g3
+// CHECK: 0x22 0 3 1 X86_64_RELOC_UNSIGNED 0 _g3
+// CHECK: 0x1A 0 3 1 X86_64_RELOC_UNSIGNED 0 _g3
+// CHECK: 0x12 0 3 1 X86_64_RELOC_UNSIGNED 0 _g2
+// CHECK: 0xA 0 3 1 X86_64_RELOC_UNSIGNED 0 _g2
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _foo (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _g0 (18)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x2
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _g1 (14)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x5A
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _g2 (10)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x5E
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _g3 (6)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0xE8
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 232
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0xEC
+// CHECK: fileoff: 384
+// CHECK: filesize: 236
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 5
+// CHECK: iextdefsym: 5
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 5
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/darwin-x86_64-nobase-relocs.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/darwin-x86_64-nobase-relocs.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/darwin-x86_64-nobase-relocs.s (original)
+++ llvm/trunk/test/MC/MachO/darwin-x86_64-nobase-relocs.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -n -triple x86_64-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -n -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -macho-segment | FileCheck %s
// Test case for rdar://10062261
@@ -15,44 +15,58 @@ Lbar:
mov $1, %eax
ret
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 2)
-// CHECK: ('load_commands_size', 168)
-// CHECK: ('flag', 0)
-// CHECK: ('reserved', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 25)
-// CHECK: ('size', 152)
-// 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', 17)
-// CHECK: ('file_offset', 200)
-// CHECK: ('file_size', 17)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 1)
-// 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', 17)
-// CHECK: ('offset', 200)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '90eb080f 1f40000f 1f4000b8 01000000 c3')
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 2
+// CHECK: SizeOfLoadCommands: 168
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x11
+// CHECK: Offset: 200
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 90EB080F 1F40000F 1F4000B8 01000000 |..... at ...@......|
+// CHECK: 0010: C3 |.|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 152
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x11
+// CHECK: fileoff: 200
+// CHECK: filesize: 17
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 1
+// CHECK: flags: 0x0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/darwin-x86_64-reloc-offsets.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/darwin-x86_64-reloc-offsets.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/darwin-x86_64-reloc-offsets.s (original)
+++ llvm/trunk/test/MC/MachO/darwin-x86_64-reloc-offsets.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.data
@@ -114,230 +114,178 @@ L1:
movl %eax, L1 + 3(%rip)
movl %eax, L1 + 4(%rip)
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 352)
-// 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', 358)
-// CHECK: ('file_offset', 384)
-// CHECK: ('file_size', 358)
-// 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', 318)
-// CHECK: ('offset', 384)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 744)
-// CHECK: ('num_reloc', 42)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0x13a),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0x134),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 2
-// CHECK: (('word-0', 0x12e),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 3
-// CHECK: (('word-0', 0x128),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 4
-// CHECK: (('word-0', 0x122),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 5
-// CHECK: (('word-0', 0x11c),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 6
-// CHECK: (('word-0', 0x116),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 7
-// CHECK: (('word-0', 0x10c),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 8
-// CHECK: (('word-0', 0x102),
-// CHECK: ('word-1', 0x6d000000)),
-// CHECK: # Relocation 9
-// CHECK: (('word-0', 0xf8),
-// CHECK: ('word-1', 0x7d000000)),
-// CHECK: # Relocation 10
-// CHECK: (('word-0', 0xee),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 11
-// CHECK: (('word-0', 0xe4),
-// CHECK: ('word-1', 0x8d000000)),
-// CHECK: # Relocation 12
-// CHECK: (('word-0', 0xdd),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 13
-// CHECK: (('word-0', 0xd6),
-// CHECK: ('word-1', 0x6d000000)),
-// CHECK: # Relocation 14
-// CHECK: (('word-0', 0xd0),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 15
-// CHECK: (('word-0', 0xca),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 16
-// CHECK: (('word-0', 0xc4),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 17
-// CHECK: (('word-0', 0xbe),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 18
-// CHECK: (('word-0', 0xb8),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 19
-// CHECK: (('word-0', 0xb2),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 20
-// CHECK: (('word-0', 0xac),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 21
-// CHECK: (('word-0', 0xa2),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 22
-// CHECK: (('word-0', 0x98),
-// CHECK: ('word-1', 0x65000002)),
-// CHECK: # Relocation 23
-// CHECK: (('word-0', 0x8e),
-// CHECK: ('word-1', 0x75000002)),
-// CHECK: # Relocation 24
-// CHECK: (('word-0', 0x84),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 25
-// CHECK: (('word-0', 0x7a),
-// CHECK: ('word-1', 0x85000002)),
-// CHECK: # Relocation 26
-// CHECK: (('word-0', 0x73),
-// CHECK: ('word-1', 0x15000002)),
-// CHECK: # Relocation 27
-// CHECK: (('word-0', 0x6c),
-// CHECK: ('word-1', 0x65000002)),
-// CHECK: # Relocation 28
-// CHECK: (('word-0', 0x66),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 29
-// CHECK: (('word-0', 0x60),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 30
-// CHECK: (('word-0', 0x5a),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 31
-// CHECK: (('word-0', 0x54),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 32
-// CHECK: (('word-0', 0x4e),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 33
-// CHECK: (('word-0', 0x48),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 34
-// CHECK: (('word-0', 0x42),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 35
-// CHECK: (('word-0', 0x38),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 36
-// CHECK: (('word-0', 0x2e),
-// CHECK: ('word-1', 0x6d000000)),
-// CHECK: # Relocation 37
-// CHECK: (('word-0', 0x24),
-// CHECK: ('word-1', 0x7d000000)),
-// CHECK: # Relocation 38
-// CHECK: (('word-0', 0x1a),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 39
-// CHECK: (('word-0', 0x10),
-// CHECK: ('word-1', 0x8d000000)),
-// CHECK: # Relocation 40
-// CHECK: (('word-0', 0x9),
-// CHECK: ('word-1', 0x1d000000)),
-// CHECK: # Relocation 41
-// CHECK: (('word-0', 0x2),
-// CHECK: ('word-1', 0x6d000000)),
-// CHECK: ])
-// CHECK: ('_section_data', 'c605ffff ffff12c6 05000000 0012c705 fcffffff 78563412 c705fdff ffff7856 3412c705 feffffff 78563412 c705ffff ffff7856 3412c705 00000000 78563412 88050000 00008805 01000000 89050000 00008905 01000000 89050200 00008905 03000000 89050400 0000c605 dd000000 12c605d7 00000012 c705cc00 00007856 3412c705 c3000000 78563412 c705ba00 00007856 3412c705 b1000000 78563412 c705a800 00007856 34128805 9e000000 88059900 00008905 92000000 89058d00 00008905 88000000 89058300 00008905 7e000000 c6050300 000012c6 05040000 0012c705 00000000 78563412 c7050100 00007856 3412c705 02000000 78563412 c7050300 00007856 3412c705 04000000 78563412 88050400 00008805 05000000 89050400 00008905 05000000 89050600 00008905 07000000 89050800 0000')
-// 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', 318)
-// CHECK: ('size', 40)
-// CHECK: ('offset', 702)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x0)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 1080)
-// CHECK: ('nsyms', 1)
-// CHECK: ('stroff', 1096)
-// CHECK: ('strsize', 4)
-// CHECK: ('_string_data', '\x00_d\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 350)
-// CHECK: ('_string', '_d')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 1)
-// CHECK: ('iextdefsym', 1)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 1)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 352
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x13E
+// CHECK: Offset: 384
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x2E8
+// CHECK: RelocationCount: 42
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: C605FFFF FFFF12C6 05000000 0012C705 |................|
+// CHECK: 0010: FCFFFFFF 78563412 C705FDFF FFFF7856 |....xV4.......xV|
+// CHECK: 0020: 3412C705 FEFFFFFF 78563412 C705FFFF |4.......xV4.....|
+// CHECK: 0030: FFFF7856 3412C705 00000000 78563412 |..xV4.......xV4.|
+// CHECK: 0040: 88050000 00008805 01000000 89050000 |................|
+// CHECK: 0050: 00008905 01000000 89050200 00008905 |................|
+// CHECK: 0060: 03000000 89050400 0000C605 DD000000 |................|
+// CHECK: 0070: 12C605D7 00000012 C705CC00 00007856 |..............xV|
+// CHECK: 0080: 3412C705 C3000000 78563412 C705BA00 |4.......xV4.....|
+// CHECK: 0090: 00007856 3412C705 B1000000 78563412 |..xV4.......xV4.|
+// CHECK: 00A0: C705A800 00007856 34128805 9E000000 |......xV4.......|
+// CHECK: 00B0: 88059900 00008905 92000000 89058D00 |................|
+// CHECK: 00C0: 00008905 88000000 89058300 00008905 |................|
+// CHECK: 00D0: 7E000000 C6050300 000012C6 05040000 |~...............|
+// CHECK: 00E0: 0012C705 00000000 78563412 C7050100 |........xV4.....|
+// CHECK: 00F0: 00007856 3412C705 02000000 78563412 |..xV4.......xV4.|
+// CHECK: 0100: C7050300 00007856 3412C705 04000000 |......xV4.......|
+// CHECK: 0110: 78563412 88050400 00008805 05000000 |xV4.............|
+// CHECK: 0120: 89050400 00008905 05000000 89050600 |................|
+// CHECK: 0130: 00008905 07000000 89050800 0000 |..............|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x13E
+// CHECK: Size: 0x28
+// CHECK: Offset: 702
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0010: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0020: 00000000 00000000 |........|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __text {
+// CHECK: 0x13A 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x134 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x12E 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x128 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x122 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x11C 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x116 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x10C 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x102 1 2 1 X86_64_RELOC_SIGNED_1 0 _d
+// CHECK: 0xF8 1 2 1 X86_64_RELOC_SIGNED_2 0 _d
+// CHECK: 0xEE 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0xE4 1 2 1 X86_64_RELOC_SIGNED_4 0 _d
+// CHECK: 0xDD 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0xD6 1 2 1 X86_64_RELOC_SIGNED_1 0 _d
+// CHECK: 0xD0 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0xCA 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0xC4 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0xBE 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0xB8 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0xB2 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0xAC 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0xA2 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0x98 1 2 0 X86_64_RELOC_SIGNED_1 0 __data
+// CHECK: 0x8E 1 2 0 X86_64_RELOC_SIGNED_2 0 __data
+// CHECK: 0x84 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0x7A 1 2 0 X86_64_RELOC_SIGNED_4 0 __data
+// CHECK: 0x73 1 2 0 X86_64_RELOC_SIGNED 0 __data
+// CHECK: 0x6C 1 2 0 X86_64_RELOC_SIGNED_1 0 __data
+// CHECK: 0x66 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x60 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x5A 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x54 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x4E 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x48 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x42 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x38 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x2E 1 2 1 X86_64_RELOC_SIGNED_1 0 _d
+// CHECK: 0x24 1 2 1 X86_64_RELOC_SIGNED_2 0 _d
+// CHECK: 0x1A 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x10 1 2 1 X86_64_RELOC_SIGNED_4 0 _d
+// CHECK: 0x9 1 2 1 X86_64_RELOC_SIGNED 0 _d
+// CHECK: 0x2 1 2 1 X86_64_RELOC_SIGNED_1 0 _d
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _d (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x15E
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 232
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x166
+// CHECK: fileoff: 384
+// CHECK: filesize: 358
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 1
+// CHECK: iextdefsym: 1
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 1
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/data.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/data.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/data.s (original)
+++ llvm/trunk/test/MC/MachO/data.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -macho-segment | FileCheck %s
.data
.ascii "hello"
@@ -14,54 +14,67 @@
.short 0 // 50
.p2alignw 3, 0xABCD, 5 // 50
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 2)
-// CHECK: ('load_commands_size', 208)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 192)
-// 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', 50)
-// CHECK: ('file_offset', 236)
-// CHECK: ('file_size', 50)
-// 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', 0)
-// CHECK: ('offset', 236)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// 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', 0)
-// CHECK: ('size', 50)
-// CHECK: ('offset', 236)
-// CHECK: ('alignment', 3)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x0)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
-
// FIXME: Dump contents, so we can check those too.
+
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 2
+// CHECK: SizeOfLoadCommands: 208
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 236
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x32
+// CHECK: Offset: 236
+// CHECK: Alignment: 3
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 192
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x32
+// CHECK: fileoff: 236
+// CHECK: filesize: 50
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/diff-with-two-sections.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/diff-with-two-sections.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/diff-with-two-sections.s (original)
+++ llvm/trunk/test/MC/MachO/diff-with-two-sections.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -macho-segment -macho-version-min | FileCheck %s
.section __TEXT,__text,regular,pure_instructions
Leh_func_begin0:
@@ -7,64 +7,81 @@ Ltmp3:
Ltmp4 = Leh_func_begin0-Ltmp3
.long Ltmp4
-// CHECK: ('cputype', 7)
-// CHECK-NEXT: ('cpusubtype', 3)
-// CHECK-NEXT: ('filetype', 1)
-// CHECK-NEXT: ('num_load_commands', 2)
-// CHECK-NEXT: ('load_commands_size', 208)
-// CHECK-NEXT: ('flag', 0)
-// CHECK-NEXT: ('load_commands', [
-// CHECK-NEXT: # Load Command 0
-// CHECK-NEXT: (('command', 1)
-// CHECK-NEXT: ('size', 192)
-// CHECK-NEXT: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('vm_addr', 0)
-// CHECK-NEXT: ('vm_size', 4)
-// CHECK-NEXT: ('file_offset', 236)
-// CHECK-NEXT: ('file_size', 4)
-// CHECK-NEXT: ('maxprot', 7)
-// CHECK-NEXT: ('initprot', 7)
-// CHECK-NEXT: ('num_sections', 2)
-// CHECK-NEXT: ('flags', 0)
-// CHECK-NEXT: ('sections', [
-// CHECK-NEXT: # Section 0
-// CHECK-NEXT: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 0)
-// CHECK-NEXT: ('size', 0)
-// CHECK-NEXT: ('offset', 236)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 0)
-// CHECK-NEXT: ('num_reloc', 0)
-// CHECK-NEXT: ('flags', 0x80000000)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', '')
-// CHECK-NEXT: # Section 1
-// CHECK-NEXT: (('section_name', '__eh_frame\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 0)
-// CHECK-NEXT: ('size', 4)
-// CHECK-NEXT: ('offset', 236)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 0)
-// CHECK-NEXT: ('num_reloc', 0)
-// CHECK-NEXT: ('flags', 0x6800000b)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', '00000000')
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Load Command 1
-// CHECK-NEXT: (('command', 36)
-// CHECK-NEXT: ('size', 16)
-// CHECK-NEXT: ('version, 589824)
-// CHECK-NEXT: ('sdk, 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: File: <stdin>
+// CHECK-NEXT: Format: Mach-O 32-bit i386
+// CHECK-NEXT: Arch: i386
+// CHECK-NEXT: AddressSize: 32bit
+// CHECK-NEXT: MachHeader {
+// CHECK-NEXT: Magic: Magic (0xFEEDFACE)
+// CHECK-NEXT: CpuType: X86 (0x7)
+// CHECK-NEXT: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK-NEXT: FileType: Relocatable (0x1)
+// CHECK-NEXT: NumOfLoadCommands: 2
+// CHECK-NEXT: SizeOfLoadCommands: 208
+// CHECK-NEXT: Flags [ (0x0)
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: Sections [
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 0
+// CHECK-NEXT: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Size: 0x0
+// CHECK-NEXT: Offset: 236
+// CHECK-NEXT: Alignment: 0
+// CHECK-NEXT: RelocationOffset: 0x0
+// CHECK-NEXT: RelocationCount: 0
+// CHECK-NEXT: Type: 0x0
+// CHECK-NEXT: Attributes [ (0x800000)
+// CHECK-NEXT: PureInstructions (0x800000)
+// CHECK-NEXT: ]
+// CHECK-NEXT: Reserved1: 0x0
+// CHECK-NEXT: Reserved2: 0x0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 1
+// CHECK-NEXT: Name: __eh_frame (5F 5F 65 68 5F 66 72 61 6D 65 00 00 00 00 00 00)
+// CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Size: 0x4
+// CHECK-NEXT: Offset: 236
+// CHECK-NEXT: Alignment: 0
+// CHECK-NEXT: RelocationOffset: 0x0
+// CHECK-NEXT: RelocationCount: 0
+// CHECK-NEXT: Type: 0xB
+// CHECK-NEXT: Attributes [ (0x680000)
+// CHECK-NEXT: LiveSupport (0x80000)
+// CHECK-NEXT: NoTOC (0x400000)
+// CHECK-NEXT: StripStaticSyms (0x200000)
+// CHECK-NEXT: ]
+// CHECK-NEXT: Reserved1: 0x0
+// CHECK-NEXT: Reserved2: 0x0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 00000000 |....|
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Segment {
+// CHECK-NEXT: Cmd: LC_SEGMENT
+// CHECK-NEXT: Name:
+// CHECK-NEXT: Size: 192
+// CHECK-NEXT: vmaddr: 0x0
+// CHECK-NEXT: vmsize: 0x4
+// CHECK-NEXT: fileoff: 236
+// CHECK-NEXT: filesize: 4
+// CHECK-NEXT: maxprot: rwx
+// CHECK-NEXT: initprot: rwx
+// CHECK-NEXT: nsects: 2
+// CHECK-NEXT: flags: 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: MinVersion {
+// CHECK-NEXT: Cmd: LC_VERSION_MIN_MACOSX
+// CHECK-NEXT: Size: 16
+// CHECK-NEXT: Version: 9.0
+// CHECK-NEXT: SDK: n/a
+// CHECK-NEXT: }
Modified: llvm/trunk/test/MC/MachO/direction_labels.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/direction_labels.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/direction_labels.s (original)
+++ llvm/trunk/test/MC/MachO/direction_labels.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
direction_labels:
10: nop
@@ -11,85 +11,88 @@ direction_labels:
11: nop
ret
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 244)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 124)
-// 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', 13)
-// CHECK: ('file_offset', 272)
-// CHECK: ('file_size', 13)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 1)
-// 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', 13)
-// CHECK: ('offset', 272)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '90ebfd90 75009075 fdeb0090 c3')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 288)
-// CHECK: ('nsyms', 1)
-// CHECK: ('stroff', 300)
-// CHECK: ('strsize', 20)
-// CHECK: ('_string_data', '\x00direction_labels\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'direction_labels')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 1)
-// CHECK: ('iextdefsym', 1)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 1)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 244
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0xD
+// CHECK: Offset: 272
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: direction_labels (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 124
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0xD
+// CHECK: fileoff: 272
+// CHECK: filesize: 13
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 1
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 1
+// CHECK: iextdefsym: 1
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 1
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/indirect-symbols.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/indirect-symbols.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/indirect-symbols.s (original)
+++ llvm/trunk/test/MC/MachO/indirect-symbols.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
_b:
_c = 0
@@ -20,169 +20,200 @@ _e:
.indirect_symbol _f
.long 0
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 380)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 260)
-// 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', 27)
-// CHECK: ('file_offset', 408)
-// CHECK: ('file_size', 27)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 3)
-// 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', 0)
-// CHECK: ('offset', 408)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '')
-// CHECK: # Section 1
-// CHECK: (('section_name', '__jump_table\x00\x00\x00\x00')
-// CHECK: ('segment_name', '__IMPORT\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 0)
-// CHECK: ('size', 15)
-// CHECK: ('offset', 408)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x84000008)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 5)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', 'f4f4f4f4 f4f4f4f4 f4f4f4f4 f4f4f4')
-// CHECK: # Section 2
-// CHECK: (('section_name', '__pointers\x00\x00\x00\x00\x00\x00')
-// CHECK: ('segment_name', '__IMPORT\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 15)
-// CHECK: ('size', 12)
-// CHECK: ('offset', 423)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x6)
-// CHECK: ('reserved1', 3)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '00000000 00000000 00000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 460)
-// CHECK: ('nsyms', 6)
-// CHECK: ('stroff', 532)
-// CHECK: ('strsize', 20)
-// CHECK: ('_string_data', '\x00_f\x00_e\x00_d\x00_c\x00_b\x00_a\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 13)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_b')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 10)
-// CHECK: ('n_type', 0x2)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_c')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 4)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_e')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0x2)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_f')
-// CHECK: ),
-// CHECK: # Symbol 4
-// CHECK: (('n_strx', 16)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 1)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_a')
-// CHECK: ),
-// CHECK: # Symbol 5
-// CHECK: (('n_strx', 7)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_d')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 4)
-// CHECK: ('iextdefsym', 4)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 4)
-// CHECK: ('nundefsym', 2)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 436)
-// CHECK: ('nindirectsyms', 6)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: # Indirect Symbol 0
-// CHECK: (('symbol_index', 0x4),),
-// CHECK: # Indirect Symbol 1
-// CHECK: (('symbol_index', 0x0),),
-// CHECK: # Indirect Symbol 2
-// CHECK: (('symbol_index', 0x1),),
-// CHECK: # Indirect Symbol 3
-// CHECK: (('symbol_index', 0x5),),
-// CHECK: # Indirect Symbol 4
-// CHECK: (('symbol_index', 0x80000000),),
-// CHECK: # Indirect Symbol 5
-// CHECK: (('symbol_index', 0xc0000000),),
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 380
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 408
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __jump_table (5F 5F 6A 75 6D 70 5F 74 61 62 6C 65 00 00 00 00)
+// CHECK: Segment: __IMPORT (5F 5F 49 4D 50 4F 52 54 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0xF
+// CHECK: Offset: 408
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x8
+// CHECK: Attributes [ (0x840000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SelfModifyingCode (0x40000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x5
+// CHECK: SectionData (
+// CHECK: 0000: F4F4F4F4 F4F4F4F4 F4F4F4F4 F4F4F4 |...............|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 2
+// CHECK: Name: __pointers (5F 5F 70 6F 69 6E 74 65 72 73 00 00 00 00 00 00)
+// CHECK: Segment: __IMPORT (5F 5F 49 4D 50 4F 52 54 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0xF
+// CHECK: Size: 0xC
+// CHECK: Offset: 423
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x6
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x3
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00000000 00000000 00000000 |............|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _b (13)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _c (10)
+// CHECK: Type: Abs (0x2)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _e (4)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _f (1)
+// CHECK: Type: Abs (0x2)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _a (16)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: ReferenceFlagUndefinedLazy (0x1)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _d (7)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 6
+// CHECK: Symbols [
+// CHECK: Entry {
+// CHECK: Entry Index: 0
+// CHECK: Symbol Index: 0x4
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 1
+// CHECK: Symbol Index: 0x0
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 2
+// CHECK: Symbol Index: 0x1
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 3
+// CHECK: Symbol Index: 0x5
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 4
+// CHECK: Symbol Index: 0x80000000
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 5
+// CHECK: Symbol Index: 0xC0000000
+// CHECK: }
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 260
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x1B
+// CHECK: fileoff: 408
+// CHECK: filesize: 27
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 3
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 4
+// CHECK: iextdefsym: 4
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 4
+// CHECK: nundefsym: 2
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 436
+// CHECK: nindirectsyms: 6
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/jcc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/jcc.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/jcc.s (original)
+++ llvm/trunk/test/MC/MachO/jcc.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -macho-segment | FileCheck %s
ja 1f
1: nop
@@ -65,42 +65,60 @@
jz 1f
1: nop
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 2)
-// CHECK: ('load_commands_size', 140)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 124)
-// 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', 96)
-// CHECK: ('file_offset', 168)
-// CHECK: ('file_size', 96)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 1)
-// 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', 96)
-// CHECK: ('offset', 168)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '77009073 00907200 90760090 720090e3 0090e300 90740090 7f00907d 00907c00 907e0090 76009072 00907300 90770090 73009075 00907e00 907c0090 7d00907f 00907100 907b0090 79009075 00907000 907a0090 7a00907b 00907800 90740090')
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 2
+// CHECK: SizeOfLoadCommands: 140
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x60
+// CHECK: Offset: 168
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 77009073 00907200 90760090 720090E3 |w..s..r..v..r...|
+// CHECK: 0010: 0090E300 90740090 7F00907D 00907C00 |.....t.....}..|.|
+// CHECK: 0020: 907E0090 76009072 00907300 90770090 |.~..v..r..s..w..|
+// CHECK: 0030: 73009075 00907E00 907C0090 7D00907F |s..u..~..|..}...|
+// CHECK: 0040: 00907100 907B0090 79009075 00907000 |..q..{..y..u..p.|
+// CHECK: 0050: 907A0090 7A00907B 00907800 90740090 |.z..z..{..x..t..|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 124
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x60
+// CHECK: fileoff: 168
+// CHECK: filesize: 96
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 1
+// CHECK: flags: 0x0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/lcomm-attributes.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/lcomm-attributes.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/lcomm-attributes.s (original)
+++ llvm/trunk/test/MC/MachO/lcomm-attributes.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
// Note, this test intentionally mismatches Darwin 'as', which loses the
// following global marker.
@@ -14,123 +14,134 @@
.zerofill __DATA, __bss, sym_zfill_ext_B, 4
.globl sym_zfill_ext_B
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 312)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 192)
-// 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', 16)
-// CHECK: ('file_offset', 340)
-// CHECK: ('file_size', 0)
-// 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', 0)
-// CHECK: ('offset', 340)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: # Section 1
-// CHECK: (('section_name', '__bss\x00\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', 0)
-// CHECK: ('size', 16)
-// CHECK: ('offset', 0)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x1)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 340)
-// CHECK: ('nsyms', 4)
-// CHECK: ('stroff', 388)
-// CHECK: ('strsize', 68)
-// CHECK: ('_string_data', '\x00sym_lcomm_ext_B\x00sym_zfill_ext_B\x00sym_lcomm_ext_A\x00sym_zfill_ext_A\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 33)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lcomm_ext_A')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 4)
-// CHECK: ('_string', 'sym_lcomm_ext_B')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 49)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 8)
-// CHECK: ('_string', 'sym_zfill_ext_A')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 17)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 12)
-// CHECK: ('_string', 'sym_zfill_ext_B')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 0)
-// CHECK: ('iextdefsym', 0)
-// CHECK: ('nextdefsym', 4)
-// CHECK: ('iundefsym', 4)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 312
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 340
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __bss (5F 5F 62 73 73 00 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x10
+// CHECK: Offset: 0
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: LocReloc (0x1)
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: sym_lcomm_ext_A (33)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __bss (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lcomm_ext_B (1)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __bss (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x4
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_zfill_ext_A (49)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __bss (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x8
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_zfill_ext_B (17)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __bss (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0xC
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 192
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x10
+// CHECK: fileoff: 340
+// CHECK: filesize: 0
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 0
+// CHECK: iextdefsym: 0
+// CHECK: nextdefsym: 4
+// CHECK: iundefsym: 4
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/pcrel-to-other-section.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/pcrel-to-other-section.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/pcrel-to-other-section.s (original)
+++ llvm/trunk/test/MC/MachO/pcrel-to-other-section.s Wed Sep 9 20:50:00 2015
@@ -1,107 +1,119 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
nop
.section __TEXT,__StaticInit,regular,pure_instructions
calll foo
-// CHECK: ('cputype', 7)
-// CHECK-NEXT: ('cpusubtype', 3)
-// CHECK-NEXT: ('filetype', 1)
-// CHECK-NEXT: ('num_load_commands', 4)
-// CHECK-NEXT: ('load_commands_size', 312)
-// CHECK-NEXT: ('flag', 0)
-// CHECK-NEXT: ('load_commands', [
-// CHECK-NEXT: # Load Command 0
-// CHECK-NEXT: (('command', 1)
-// CHECK-NEXT: ('size', 192)
-// CHECK-NEXT: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('vm_addr', 0)
-// CHECK-NEXT: ('vm_size', 6)
-// CHECK-NEXT: ('file_offset', 340)
-// CHECK-NEXT: ('file_size', 6)
-// CHECK-NEXT: ('maxprot', 7)
-// CHECK-NEXT: ('initprot', 7)
-// CHECK-NEXT: ('num_sections', 2)
-// CHECK-NEXT: ('flags', 0)
-// CHECK-NEXT: ('sections', [
-// CHECK-NEXT: # Section 0
-// CHECK-NEXT: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 0)
-// CHECK-NEXT: ('size', 1)
-// CHECK-NEXT: ('offset', 340)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 0)
-// CHECK-NEXT: ('num_reloc', 0)
-// CHECK-NEXT: ('flags', 0x80000400)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', '90')
-// CHECK-NEXT: # Section 1
-// CHECK-NEXT: (('section_name', '__StaticInit\x00\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 1)
-// CHECK-NEXT: ('size', 5)
-// CHECK-NEXT: ('offset', 341)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 348)
-// CHECK-NEXT: ('num_reloc', 1)
-// CHECK-NEXT: ('flags', 0x80000400)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('word-0', 0x1),
-// CHECK-NEXT: ('word-1', 0xd000000)),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', 'e8faffff ff')
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK: # Load Command 2
-// CHECK-NEXT: (('command', 2)
-// CHECK-NEXT: ('size', 24)
-// CHECK-NEXT: ('symoff', 356)
-// CHECK-NEXT: ('nsyms', 1)
-// CHECK-NEXT: ('stroff', 368)
-// CHECK-NEXT: ('strsize', 8)
-// CHECK-NEXT: ('_string_data', '\x00foo\x00\x00\x00\x00')
-// CHECK-NEXT: ('_symbols', [
-// CHECK-NEXT: # Symbol 0
-// CHECK-NEXT: (('n_strx', 1)
-// CHECK-NEXT: ('n_type', 0x1)
-// CHECK-NEXT: ('n_sect', 0)
-// CHECK-NEXT: ('n_desc', 0)
-// CHECK-NEXT: ('n_value', 0)
-// CHECK-NEXT: ('_string', 'foo')
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Load Command 3
-// CHECK-NEXT: (('command', 11)
-// CHECK-NEXT: ('size', 80)
-// CHECK-NEXT: ('ilocalsym', 0)
-// CHECK-NEXT: ('nlocalsym', 0)
-// CHECK-NEXT: ('iextdefsym', 0)
-// CHECK-NEXT: ('nextdefsym', 0)
-// CHECK-NEXT: ('iundefsym', 0)
-// CHECK-NEXT: ('nundefsym', 1)
-// CHECK-NEXT: ('tocoff', 0)
-// CHECK-NEXT: ('ntoc', 0)
-// CHECK-NEXT: ('modtaboff', 0)
-// CHECK-NEXT: ('nmodtab', 0)
-// CHECK-NEXT: ('extrefsymoff', 0)
-// CHECK-NEXT: ('nextrefsyms', 0)
-// CHECK-NEXT: ('indirectsymoff', 0)
-// CHECK-NEXT: ('nindirectsyms', 0)
-// CHECK-NEXT: ('extreloff', 0)
-// CHECK-NEXT: ('nextrel', 0)
-// CHECK-NEXT: ('locreloff', 0)
-// CHECK-NEXT: ('nlocrel', 0)
-// CHECK-NEXT: ('_indirect_symbols', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 312
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x1
+// CHECK: Offset: 340
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 90 |.|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __StaticInit (5F 5F 53 74 61 74 69 63 49 6E 69 74 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x1
+// CHECK: Size: 0x5
+// CHECK: Offset: 341
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x15C
+// CHECK: RelocationCount: 1
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: E8FAFFFF FF |.....|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __StaticInit {
+// CHECK: 0x1 1 2 1 GENERIC_RELOC_VANILLA 0 foo
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: foo (1)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 192
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x6
+// CHECK: fileoff: 340
+// CHECK: filesize: 6
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 0
+// CHECK: iextdefsym: 0
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 0
+// CHECK: nundefsym: 1
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/relax-jumps.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/relax-jumps.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/relax-jumps.s (original)
+++ llvm/trunk/test/MC/MachO/relax-jumps.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -s -sd | FileCheck %s
// FIXME: This is a horrible way of checking the output, we need an llvm-mc
// based 'otool'. Use:
@@ -10,10 +10,6 @@
// diff $f.{as,mc}.dump)
// to examine the results in a more sensible fashion.
-// CHECK: ('_section_data', '90
-// CHECK: 0f8432ff ffff0f82 e6000000 0f8726ff ffff0f8f da000000 0f881aff ffff0f83 ce000000 0f890eff ffff90
-// CHECK: 9031c0')
-
L1:
.space 200, 0x90
@@ -29,3 +25,12 @@ L1:
L2:
xorl %eax, %eax
+
+// CHECK: SectionData (
+// CHECK: 00C0: 90909090 90909090 0F8432FF FFFF0F82 |..........2.....|
+// CHECK: 00D0: E6000000 0F8726FF FFFF0F8F DA000000 |......&.........|
+// CHECK: 00E0: 0F881AFF FFFF0F83 CE000000 0F890EFF |................|
+// CHECK: 00F0: FFFF9090 90909090 90909090 90909090 |................|
+// CHECK: 01A0: 90909090 90909090 90909090 90909090 |................|
+// CHECK: 01B0: 90909090 90909090 909031C0 |..........1.|
+// CHECK: )
Modified: llvm/trunk/test/MC/MachO/section-align-1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/section-align-1.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/section-align-1.s (original)
+++ llvm/trunk/test/MC/MachO/section-align-1.s Wed Sep 9 20:50:00 2015
@@ -1,87 +1,89 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -t -file-headers -s -macho-indirect-symbols -macho-dysymtab -macho-segment | FileCheck %s
name:
.byte 0
// Check that symbol table is aligned to 4 bytes.
-
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 244)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 124)
-// 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', 1)
-// CHECK: ('file_offset', 272)
-// CHECK: ('file_size', 1)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 1)
-// 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', 1)
-// CHECK: ('offset', 272)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 276)
-// CHECK: ('nsyms', 1)
-// CHECK: ('stroff', 288)
-// CHECK: ('strsize', 8)
-// CHECK: ('_string_data', '\x00name\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'name')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 1)
-// CHECK: ('iextdefsym', 1)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 1)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 244
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x1
+// CHECK: Offset: 272
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: name (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 124
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x1
+// CHECK: fileoff: 272
+// CHECK: filesize: 1
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 1
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 1
+// CHECK: iextdefsym: 1
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 1
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/section-align-2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/section-align-2.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/section-align-2.s (original)
+++ llvm/trunk/test/MC/MachO/section-align-2.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.byte 0
@@ -14,124 +14,137 @@ bar:
.const
baz:
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 380)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 260)
-// 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', 13)
-// CHECK: ('file_offset', 408)
-// CHECK: ('file_size', 13)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 3)
-// 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', 1)
-// CHECK: ('offset', 408)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// 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', 4)
-// CHECK: ('size', 9)
-// CHECK: ('offset', 412)
-// CHECK: ('alignment', 2)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x0)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: # Section 2
-// CHECK: (('section_name', '__const\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', 13)
-// CHECK: ('size', 0)
-// CHECK: ('offset', 421)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x0)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 424)
-// CHECK: ('nsyms', 3)
-// CHECK: ('stroff', 460)
-// CHECK: ('strsize', 16)
-// CHECK: ('_string_data', '\x00baz\x00bar\x00foo\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 9)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 4)
-// CHECK: ('_string', 'foo')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 5)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 12)
-// CHECK: ('_string', 'bar')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 3)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 13)
-// CHECK: ('_string', 'baz')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 3)
-// CHECK: ('iextdefsym', 3)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 3)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 380
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x1
+// CHECK: Offset: 408
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x4
+// CHECK: Size: 0x9
+// CHECK: Offset: 412
+// CHECK: Alignment: 2
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 2
+// CHECK: Name: __const (5F 5F 63 6F 6E 73 74 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0xD
+// CHECK: Size: 0x0
+// CHECK: Offset: 421
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: foo (9)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x4
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: bar (5)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0xC
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: baz (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __const (0x3)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0xD
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 260
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0xD
+// CHECK: fileoff: 408
+// CHECK: filesize: 13
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 3
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 3
+// CHECK: iextdefsym: 3
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 3
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/string-table.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/string-table.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/string-table.s (original)
+++ llvm/trunk/test/MC/MachO/string-table.s Wed Sep 9 20:50:00 2015
@@ -1,100 +1,107 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
movl $a, b
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 244)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 124)
-// 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', 10)
-// CHECK: ('file_offset', 272)
-// CHECK: ('file_size', 10)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 1)
-// 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', 10)
-// CHECK: ('offset', 272)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 284)
-// CHECK: ('num_reloc', 2)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0x6),
-// CHECK: ('word-1', 0xc000000)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0x2),
-// CHECK: ('word-1', 0xc000001)),
-// CHECK: ])
-// CHECK: ('_section_data', 'c7050000 00000000 0000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 300)
-// CHECK: ('nsyms', 2)
-// CHECK: ('stroff', 324)
-// CHECK: ('strsize', 8)
-// CHECK: ('_string_data', '\x00b\x00a\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 3)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'a')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'b')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 0)
-// CHECK: ('iextdefsym', 0)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 0)
-// CHECK: ('nundefsym', 2)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 244
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0xA
+// CHECK: Offset: 272
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x11C
+// CHECK: RelocationCount: 2
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: C7050000 00000000 0000 |..........|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __text {
+// CHECK: 0x6 0 2 1 GENERIC_RELOC_VANILLA 0 a
+// CHECK: 0x2 0 2 1 GENERIC_RELOC_VANILLA 0 b
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: a (3)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: b (1)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 124
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0xA
+// CHECK: fileoff: 272
+// CHECK: filesize: 10
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 1
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 0
+// CHECK: iextdefsym: 0
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 0
+// CHECK: nundefsym: 2
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/symbol-diff.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/symbol-diff.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/symbol-diff.s (original)
+++ llvm/trunk/test/MC/MachO/symbol-diff.s Wed Sep 9 20:50:00 2015
@@ -1,122 +1,131 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
_g:
LFB2:
.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
_g.eh:
.quad LFB2-.
-// CHECK: ('cputype', 16777223)
-// CHECK-NEXT: ('cpusubtype', 3)
-// CHECK-NEXT: ('filetype', 1)
-// CHECK-NEXT: ('num_load_commands', 4)
-// CHECK-NEXT: ('load_commands_size', 352)
-// CHECK-NEXT: ('flag', 0)
-// CHECK-NEXT: ('reserved', 0)
-// CHECK-NEXT: ('load_commands', [
-// CHECK-NEXT: # Load Command 0
-// CHECK-NEXT: (('command', 25)
-// CHECK-NEXT: ('size', 232)
-// CHECK-NEXT: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('vm_addr', 0)
-// CHECK-NEXT: ('vm_size', 8)
-// CHECK-NEXT: ('file_offset', 384)
-// CHECK-NEXT: ('file_size', 8)
-// CHECK-NEXT: ('maxprot', 7)
-// CHECK-NEXT: ('initprot', 7)
-// CHECK-NEXT: ('num_sections', 2)
-// CHECK-NEXT: ('flags', 0)
-// CHECK-NEXT: ('sections', [
-// CHECK-NEXT: # Section 0
-// CHECK-NEXT: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 0)
-// CHECK-NEXT: ('size', 0)
-// CHECK-NEXT: ('offset', 384)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 0)
-// CHECK-NEXT: ('num_reloc', 0)
-// CHECK-NEXT: ('flags', 0x80000000)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ('reserved3', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', '')
-// CHECK-NEXT: # Section 1
-// CHECK-NEXT: (('section_name', '__eh_frame\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 0)
-// CHECK-NEXT: ('size', 8)
-// CHECK-NEXT: ('offset', 384)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 392)
-// CHECK-NEXT: ('num_reloc', 2)
-// CHECK-NEXT: ('flags', 0x6800000b)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ('reserved3', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('word-0', 0x0),
-// CHECK-NEXT: ('word-1', 0x5e000001)),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('word-0', 0x0),
-// CHECK-NEXT: ('word-1', 0xe000000)),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', '00000000 00000000')
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK: # Load Command 2
-// CHECK-NEXT: (('command', 2)
-// CHECK-NEXT: ('size', 24)
-// CHECK-NEXT: ('symoff', 408)
-// CHECK-NEXT: ('nsyms', 2)
-// CHECK-NEXT: ('stroff', 440)
-// CHECK-NEXT: ('strsize', 12)
-// CHECK-NEXT: ('_string_data', '\x00_g.eh\x00_g\x00\x00\x00')
-// CHECK-NEXT: ('_symbols', [
-// CHECK-NEXT: # Symbol 0
-// CHECK-NEXT: (('n_strx', 7)
-// CHECK-NEXT: ('n_type', 0xe)
-// CHECK-NEXT: ('n_sect', 1)
-// CHECK-NEXT: ('n_desc', 0)
-// CHECK-NEXT: ('n_value', 0)
-// CHECK-NEXT: ('_string', '_g')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 1
-// CHECK-NEXT: (('n_strx', 1)
-// CHECK-NEXT: ('n_type', 0xe)
-// CHECK-NEXT: ('n_sect', 2)
-// CHECK-NEXT: ('n_desc', 0)
-// CHECK-NEXT: ('n_value', 0)
-// CHECK-NEXT: ('_string', '_g.eh')
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Load Command 3
-// CHECK-NEXT: (('command', 11)
-// CHECK-NEXT: ('size', 80)
-// CHECK-NEXT: ('ilocalsym', 0)
-// CHECK-NEXT: ('nlocalsym', 2)
-// CHECK-NEXT: ('iextdefsym', 2)
-// CHECK-NEXT: ('nextdefsym', 0)
-// CHECK-NEXT: ('iundefsym', 2)
-// CHECK-NEXT: ('nundefsym', 0)
-// CHECK-NEXT: ('tocoff', 0)
-// CHECK-NEXT: ('ntoc', 0)
-// CHECK-NEXT: ('modtaboff', 0)
-// CHECK-NEXT: ('nmodtab', 0)
-// CHECK-NEXT: ('extrefsymoff', 0)
-// CHECK-NEXT: ('nextrefsyms', 0)
-// CHECK-NEXT: ('indirectsymoff', 0)
-// CHECK-NEXT: ('nindirectsyms', 0)
-// CHECK-NEXT: ('extreloff', 0)
-// CHECK-NEXT: ('nextrel', 0)
-// CHECK-NEXT: ('locreloff', 0)
-// CHECK-NEXT: ('nlocrel', 0)
-// CHECK-NEXT: ('_indirect_symbols', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK-NEXT:])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 352
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 384
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __eh_frame (5F 5F 65 68 5F 66 72 61 6D 65 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x8
+// CHECK: Offset: 384
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x188
+// CHECK: RelocationCount: 2
+// CHECK: Type: 0xB
+// CHECK: Attributes [ (0x680000)
+// CHECK: LiveSupport (0x80000)
+// CHECK: NoTOC (0x400000)
+// CHECK: StripStaticSyms (0x200000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00000000 00000000 |........|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __eh_frame {
+// CHECK: 0x0 0 3 1 X86_64_RELOC_SUBTRACTOR 0 _g.eh
+// CHECK: 0x0 0 3 1 X86_64_RELOC_UNSIGNED 0 _g
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _g (7)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _g.eh (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __eh_frame (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 232
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x8
+// CHECK: fileoff: 384
+// CHECK: filesize: 8
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 2
+// CHECK: iextdefsym: 2
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 2
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/symbol-flags.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/symbol-flags.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/symbol-flags.s (original)
+++ llvm/trunk/test/MC/MachO/symbol-flags.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.reference sym_ref_A
.reference sym_ref_def_A
@@ -59,283 +59,349 @@ sym_symbol_resolver_A:
.desc sym_desc_flags,0x47
sym_desc_flags:
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 312)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 192)
-// 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', 0)
-// CHECK: ('file_offset', 340)
-// CHECK: ('file_size', 0)
-// 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', 0)
-// CHECK: ('offset', 340)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// 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', 0)
-// CHECK: ('size', 0)
-// CHECK: ('offset', 340)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x0)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 340)
-// CHECK: ('nsyms', 24)
-// CHECK: ('stroff', 628)
-// CHECK: ('strsize', 388)
-// CHECK: ('_string_data', '\x00sym_desc_flags\x00sym_private_ext_E\x00sym_lazy_ref_E\x00sym_ref_def_E\x00sym_private_ext_D\x00sym_lazy_ref_D\x00sym_ref_def_D\x00sym_private_ext_C\x00sym_lazy_ref_C\x00sym_weak_def_C\x00sym_ref_def_C\x00sym_private_ext_B\x00sym_lazy_ref_B\x00sym_weak_def_B\x00sym_weak_ref_def_B\x00sym_private_ext_A\x00sym_symbol_resolver_A\x00sym_no_dead_strip_A\x00sym_lazy_ref_A\x00sym_ref_A\x00sym_weak_ref_A\x00sym_weak_def_A\x00sym_ref_def_A\x00sym_weak_ref_def_A\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 354)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_ref_def_A')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 158)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_ref_def_C')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 368)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 64)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_weak_ref_def_A')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 220)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_weak_ref_def_B')
-// CHECK: ),
-// CHECK: # Symbol 4
-// CHECK: (('n_strx', 190)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lazy_ref_B')
-// CHECK: ),
-// CHECK: # Symbol 5
-// CHECK: (('n_strx', 128)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lazy_ref_C')
-// CHECK: ),
-// CHECK: # Symbol 6
-// CHECK: (('n_strx', 257)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 256)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_symbol_resolver_A')
-// CHECK: ),
-// CHECK: # Symbol 7
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 64)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_desc_flags')
-// CHECK: ),
-// CHECK: # Symbol 8
-// CHECK: (('n_strx', 172)
-// CHECK: ('n_type', 0x1f)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_private_ext_B')
-// CHECK: ),
-// CHECK: # Symbol 9
-// CHECK: (('n_strx', 110)
-// CHECK: ('n_type', 0x1f)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_private_ext_C')
-// CHECK: ),
-// CHECK: # Symbol 10
-// CHECK: (('n_strx', 339)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 128)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_weak_def_A')
-// CHECK: ),
-// CHECK: # Symbol 11
-// CHECK: (('n_strx', 205)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 128)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_weak_def_B')
-// CHECK: ),
-// CHECK: # Symbol 12
-// CHECK: (('n_strx', 143)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 128)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_weak_def_C')
-// CHECK: ),
-// CHECK: # Symbol 13
-// CHECK: (('n_strx', 299)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 33)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lazy_ref_A')
-// CHECK: ),
-// CHECK: # Symbol 14
-// CHECK: (('n_strx', 81)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lazy_ref_D')
-// CHECK: ),
-// CHECK: # Symbol 15
-// CHECK: (('n_strx', 34)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 33)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lazy_ref_E')
-// CHECK: ),
-// CHECK: # Symbol 16
-// CHECK: (('n_strx', 279)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_no_dead_strip_A')
-// CHECK: ),
-// CHECK: # Symbol 17
-// CHECK: (('n_strx', 239)
-// CHECK: ('n_type', 0x11)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_private_ext_A')
-// CHECK: ),
-// CHECK: # Symbol 18
-// CHECK: (('n_strx', 63)
-// CHECK: ('n_type', 0x11)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_private_ext_D')
-// CHECK: ),
-// CHECK: # Symbol 19
-// CHECK: (('n_strx', 16)
-// CHECK: ('n_type', 0x11)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_private_ext_E')
-// CHECK: ),
-// CHECK: # Symbol 20
-// CHECK: (('n_strx', 314)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 4660)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_ref_A')
-// CHECK: ),
-// CHECK: # Symbol 21
-// CHECK: (('n_strx', 96)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_ref_def_D')
-// CHECK: ),
-// CHECK: # Symbol 22
-// CHECK: (('n_strx', 49)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 32)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_ref_def_E')
-// CHECK: ),
-// CHECK: # Symbol 23
-// CHECK: (('n_strx', 324)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 64)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_weak_ref_A')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 8)
-// CHECK: ('iextdefsym', 8)
-// CHECK: ('nextdefsym', 5)
-// CHECK: ('iundefsym', 13)
-// CHECK: ('nundefsym', 11)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 312
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 340
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 340
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: sym_ref_def_A (354)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_ref_def_C (158)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_weak_ref_def_A (368)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x40)
+// CHECK: WeakRef (0x40)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_weak_ref_def_B (220)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lazy_ref_B (190)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lazy_ref_C (128)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_symbol_resolver_A (257)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x100)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_desc_flags (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x40)
+// CHECK: WeakRef (0x40)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_private_ext_B (172)
+// CHECK: PrivateExtern
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_private_ext_C (110)
+// CHECK: PrivateExtern
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_weak_def_A (339)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x80)
+// CHECK: WeakDef (0x80)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_weak_def_B (205)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x80)
+// CHECK: WeakDef (0x80)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_weak_def_C (143)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x80)
+// CHECK: WeakDef (0x80)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lazy_ref_A (299)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: ReferenceFlagUndefinedLazy (0x1)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lazy_ref_D (81)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lazy_ref_E (34)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: ReferenceFlagUndefinedLazy (0x1)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_no_dead_strip_A (279)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_private_ext_A (239)
+// CHECK: PrivateExtern
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_private_ext_D (63)
+// CHECK: PrivateExtern
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_private_ext_E (16)
+// CHECK: PrivateExtern
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_ref_A (314)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: ReferenceFlagPrivateUndefinedNonLazy (0x4)
+// CHECK: Flags [ (0x1230)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ReferencedDynamically (0x10)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_ref_def_D (96)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_ref_def_E (49)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x20)
+// CHECK: NoDeadStrip (0x20)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_weak_ref_A (324)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x40)
+// CHECK: WeakRef (0x40)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 192
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x0
+// CHECK: fileoff: 340
+// CHECK: filesize: 0
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 8
+// CHECK: iextdefsym: 8
+// CHECK: nextdefsym: 5
+// CHECK: iundefsym: 13
+// CHECK: nundefsym: 11
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/symbol-indirect.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/symbol-indirect.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/symbol-indirect.s (original)
+++ llvm/trunk/test/MC/MachO/symbol-indirect.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
// FIXME: We are missing a lot of diagnostics on this kind of stuff which the
// assembler has.
@@ -69,200 +69,248 @@ sym_nlp_G:
.indirect_symbol sym_nlp_G
.long 0
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 380)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 260)
-// 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', 40)
-// CHECK: ('file_offset', 408)
-// CHECK: ('file_size', 40)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 3)
-// CHECK: ('flags', 0)
-// CHECK: ('sections', [
-// CHECK: # Section 0
-// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 0)
-// CHECK: ('size', 0)
-// CHECK: ('offset', 408)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: # Section 1
-// CHECK: (('section_name', '__la_symbol_ptr\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 0)
-// CHECK: ('size', 20)
-// CHECK: ('offset', 408)
-// CHECK: ('alignment', 2)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x7)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: # Section 2
-// CHECK: (('section_name', '__nl_symbol_ptr\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 20)
-// CHECK: ('size', 20)
-// CHECK: ('offset', 428)
-// CHECK: ('alignment', 2)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x6)
- // FIXME: Enable this when fixed!
-// CHECX: ('reserved1', 5)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 488)
-// CHECK: ('nsyms', 10)
-// CHECK: ('stroff', 608)
-// CHECK: ('strsize', 104)
-// CHECK: ('_string_data', '\x00sym_lsp_G\x00sym_nlp_G\x00sym_lsp_E\x00sym_nlp_E\x00sym_lsp_C\x00sym_nlp_C\x00sym_lsp_B\x00sym_nlp_B\x00sym_lsp_A\x00sym_nlp_A\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 41)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 8)
-// CHECK: ('_string', 'sym_lsp_C')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 51)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 3)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 28)
-// CHECK: ('_string', 'sym_nlp_C')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 16)
-// CHECK: ('_string', 'sym_lsp_G')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 11)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 3)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 36)
-// CHECK: ('_string', 'sym_nlp_G')
-// CHECK: ),
-// CHECK: # Symbol 4
-// CHECK: (('n_strx', 81)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lsp_A')
-// CHECK: ),
-// CHECK: # Symbol 5
-// CHECK: (('n_strx', 61)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 1)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lsp_B')
-// CHECK: ),
-// CHECK: # Symbol 6
-// CHECK: (('n_strx', 21)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 1)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_lsp_E')
-// CHECK: ),
-// CHECK: # Symbol 7
-// CHECK: (('n_strx', 91)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_nlp_A')
-// CHECK: ),
-// CHECK: # Symbol 8
-// CHECK: (('n_strx', 71)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_nlp_B')
-// CHECK: ),
-// CHECK: # Symbol 9
-// CHECK: (('n_strx', 31)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', 'sym_nlp_E')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 2)
-// CHECK: ('iextdefsym', 2)
-// CHECK: ('nextdefsym', 2)
-// CHECK: ('iundefsym', 4)
-// CHECK: ('nundefsym', 6)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 448)
-// CHECK: ('nindirectsyms', 10)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: # Indirect Symbol 0
-// CHECK: (('symbol_index', 0x5),),
-// CHECK: # Indirect Symbol 1
-// CHECK: (('symbol_index', 0x4),),
-// CHECK: # Indirect Symbol 2
-// CHECK: (('symbol_index', 0x0),),
-// CHECK: # Indirect Symbol 3
-// CHECK: (('symbol_index', 0x6),),
-// CHECK: # Indirect Symbol 4
-// CHECK: (('symbol_index', 0x2),),
-// CHECK: # Indirect Symbol 5
-// CHECK: (('symbol_index', 0x8),),
-// CHECK: # Indirect Symbol 6
-// CHECK: (('symbol_index', 0x7),),
-// CHECK: # Indirect Symbol 7
-// CHECK: (('symbol_index', 0x80000000),),
-// CHECK: # Indirect Symbol 8
-// CHECK: (('symbol_index', 0x9),),
-// CHECK: # Indirect Symbol 9
-// CHECK: (('symbol_index', 0x3),),
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 380
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 408
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __la_symbol_ptr (5F 5F 6C 61 5F 73 79 6D 62 6F 6C 5F 70 74 72 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x14
+// CHECK: Offset: 408
+// CHECK: Alignment: 2
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x7
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 2
+// CHECK: Name: __nl_symbol_ptr (5F 5F 6E 6C 5F 73 79 6D 62 6F 6C 5F 70 74 72 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x14
+// CHECK: Size: 0x14
+// CHECK: Offset: 428
+// CHECK: Alignment: 2
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x6
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x5
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: sym_lsp_C (41)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __la_symbol_ptr (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x8
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_nlp_C (51)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __nl_symbol_ptr (0x3)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x1C
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lsp_G (1)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __la_symbol_ptr (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x10
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_nlp_G (11)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __nl_symbol_ptr (0x3)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x24
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lsp_A (81)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lsp_B (61)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: ReferenceFlagUndefinedLazy (0x1)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_lsp_E (21)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: ReferenceFlagUndefinedLazy (0x1)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_nlp_A (91)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_nlp_B (71)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: sym_nlp_E (31)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 10
+// CHECK: Symbols [
+// CHECK: Entry {
+// CHECK: Entry Index: 0
+// CHECK: Symbol Index: 0x5
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 1
+// CHECK: Symbol Index: 0x4
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 2
+// CHECK: Symbol Index: 0x0
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 3
+// CHECK: Symbol Index: 0x6
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 4
+// CHECK: Symbol Index: 0x2
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 5
+// CHECK: Symbol Index: 0x8
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 6
+// CHECK: Symbol Index: 0x7
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 7
+// CHECK: Symbol Index: 0x80000000
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 8
+// CHECK: Symbol Index: 0x9
+// CHECK: }
+// CHECK: Entry {
+// CHECK: Entry Index: 9
+// CHECK: Symbol Index: 0x3
+// CHECK: }
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 260
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x28
+// CHECK: fileoff: 408
+// CHECK: filesize: 40
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 3
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 2
+// CHECK: iextdefsym: 2
+// CHECK: nextdefsym: 2
+// CHECK: iundefsym: 4
+// CHECK: nundefsym: 6
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 448
+// CHECK: nindirectsyms: 10
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/symbols-1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/symbols-1.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/symbols-1.s (original)
+++ llvm/trunk/test/MC/MachO/symbols-1.s Wed Sep 9 20:50:00 2015
@@ -1,5 +1,5 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck -check-prefix CHECK-X86_32 %s
-// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | macho-dump | FileCheck -check-prefix CHECK-X86_64 %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck -check-prefix CHECK-X86_32 %s
+// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck -check-prefix CHECK-X86_64 %s
sym_local_B:
.globl sym_globl_def_B
@@ -17,294 +17,330 @@ sym_globl_def_C:
Lsym_asm_temp:
.long 0
-// CHECK-X86_32: ('cputype', 7)
-// CHECK-X86_32: ('cpusubtype', 3)
-// CHECK-X86_32: ('filetype', 1)
-// CHECK-X86_32: ('num_load_commands', 4)
-// CHECK-X86_32: ('load_commands_size', 244)
-// CHECK-X86_32: ('flag', 0)
-// CHECK-X86_32: ('load_commands', [
-// CHECK-X86_32: # Load Command 0
-// CHECK-X86_32: (('command', 1)
-// CHECK-X86_32: ('size', 124)
-// CHECK-X86_32: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_32: ('vm_addr', 0)
-// CHECK-X86_32: ('vm_size', 4)
-// CHECK-X86_32: ('file_offset', 272)
-// CHECK-X86_32: ('file_size', 4)
-// CHECK-X86_32: ('maxprot', 7)
-// CHECK-X86_32: ('initprot', 7)
-// CHECK-X86_32: ('num_sections', 1)
-// CHECK-X86_32: ('flags', 0)
-// CHECK-X86_32: ('sections', [
-// CHECK-X86_32: # Section 0
-// CHECK-X86_32: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_32: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_32: ('address', 0)
-// CHECK-X86_32: ('size', 4)
-// CHECK-X86_32: ('offset', 272)
-// CHECK-X86_32: ('alignment', 0)
-// CHECK-X86_32: ('reloc_offset', 0)
-// CHECK-X86_32: ('num_reloc', 0)
-// CHECK-X86_32: ('flags', 0x80000000)
-// CHECK-X86_32: ('reserved1', 0)
-// CHECK-X86_32: ('reserved2', 0)
-// CHECK-X86_32: ),
-// CHECK-X86_32: ])
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Load Command 2
-// CHECK-X86_32: (('command', 2)
-// CHECK-X86_32: ('size', 24)
-// CHECK-X86_32: ('symoff', 276)
-// CHECK-X86_32: ('nsyms', 9)
-// CHECK-X86_32: ('stroff', 384)
-// CHECK-X86_32: ('strsize', 140)
-// CHECK-X86_32: ('_string_data', '\x00sym_local_C\x00sym_globl_undef_C\x00sym_globl_def_C\x00sym_local_B\x00sym_globl_undef_B\x00sym_globl_def_B\x00sym_local_A\x00sym_globl_undef_A\x00sym_globl_def_A\x00\x00')
-// CHECK-X86_32: ('_symbols', [
-// CHECK-X86_32: # Symbol 0
-// CHECK-X86_32: (('n_strx', 47)
-// CHECK-X86_32: ('n_type', 0xe)
-// CHECK-X86_32: ('n_sect', 1)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_local_B')
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Symbol 1
-// CHECK-X86_32: (('n_strx', 93)
-// CHECK-X86_32: ('n_type', 0xe)
-// CHECK-X86_32: ('n_sect', 1)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_local_A')
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Symbol 2
-// CHECK-X86_32: (('n_strx', 1)
-// CHECK-X86_32: ('n_type', 0xe)
-// CHECK-X86_32: ('n_sect', 1)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_local_C')
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Symbol 3
-// CHECK-X86_32: (('n_strx', 123)
-// CHECK-X86_32: ('n_type', 0xf)
-// CHECK-X86_32: ('n_sect', 1)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_globl_def_A')
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Symbol 4
-// CHECK-X86_32: (('n_strx', 77)
-// CHECK-X86_32: ('n_type', 0xf)
-// CHECK-X86_32: ('n_sect', 1)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_globl_def_B')
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Symbol 5
-// CHECK-X86_32: (('n_strx', 31)
-// CHECK-X86_32: ('n_type', 0xf)
-// CHECK-X86_32: ('n_sect', 1)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_globl_def_C')
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Symbol 6
-// CHECK-X86_32: (('n_strx', 105)
-// CHECK-X86_32: ('n_type', 0x1)
-// CHECK-X86_32: ('n_sect', 0)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_globl_undef_A')
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Symbol 7
-// CHECK-X86_32: (('n_strx', 59)
-// CHECK-X86_32: ('n_type', 0x1)
-// CHECK-X86_32: ('n_sect', 0)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_globl_undef_B')
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Symbol 8
-// CHECK-X86_32: (('n_strx', 13)
-// CHECK-X86_32: ('n_type', 0x1)
-// CHECK-X86_32: ('n_sect', 0)
-// CHECK-X86_32: ('n_desc', 0)
-// CHECK-X86_32: ('n_value', 0)
-// CHECK-X86_32: ('_string', 'sym_globl_undef_C')
-// CHECK-X86_32: ),
-// CHECK-X86_32: ])
-// CHECK-X86_32: ),
-// CHECK-X86_32: # Load Command 3
-// CHECK-X86_32: (('command', 11)
-// CHECK-X86_32: ('size', 80)
-// CHECK-X86_32: ('ilocalsym', 0)
-// CHECK-X86_32: ('nlocalsym', 3)
-// CHECK-X86_32: ('iextdefsym', 3)
-// CHECK-X86_32: ('nextdefsym', 3)
-// CHECK-X86_32: ('iundefsym', 6)
-// CHECK-X86_32: ('nundefsym', 3)
-// CHECK-X86_32: ('tocoff', 0)
-// CHECK-X86_32: ('ntoc', 0)
-// CHECK-X86_32: ('modtaboff', 0)
-// CHECK-X86_32: ('nmodtab', 0)
-// CHECK-X86_32: ('extrefsymoff', 0)
-// CHECK-X86_32: ('nextrefsyms', 0)
-// CHECK-X86_32: ('indirectsymoff', 0)
-// CHECK-X86_32: ('nindirectsyms', 0)
-// CHECK-X86_32: ('extreloff', 0)
-// CHECK-X86_32: ('nextrel', 0)
-// CHECK-X86_32: ('locreloff', 0)
-// CHECK-X86_32: ('nlocrel', 0)
-// CHECK-X86_32: ('_indirect_symbols', [
-// CHECK-X86_32: ])
-// CHECK-X86_32: ),
-// CHECK-X86_32: ])
+// CHECK-X86_32: File: <stdin>
+// CHECK-X86_32: Format: Mach-O 32-bit i386
+// CHECK-X86_32: Arch: i386
+// CHECK-X86_32: AddressSize: 32bit
+// CHECK-X86_32: MachHeader {
+// CHECK-X86_32: Magic: Magic (0xFEEDFACE)
+// CHECK-X86_32: CpuType: X86 (0x7)
+// CHECK-X86_32: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK-X86_32: FileType: Relocatable (0x1)
+// CHECK-X86_32: NumOfLoadCommands: 4
+// CHECK-X86_32: SizeOfLoadCommands: 244
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: }
+// CHECK-X86_32: Sections [
+// CHECK-X86_32: Section {
+// CHECK-X86_32: Index: 0
+// CHECK-X86_32: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK-X86_32: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK-X86_32: Address: 0x0
+// CHECK-X86_32: Size: 0x4
+// CHECK-X86_32: Offset: 272
+// CHECK-X86_32: Alignment: 0
+// CHECK-X86_32: RelocationOffset: 0x0
+// CHECK-X86_32: RelocationCount: 0
+// CHECK-X86_32: Type: 0x0
+// CHECK-X86_32: Attributes [ (0x800000)
+// CHECK-X86_32: PureInstructions (0x800000)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Reserved1: 0x0
+// CHECK-X86_32: Reserved2: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: ]
+// CHECK-X86_32: Relocations [
+// CHECK-X86_32: ]
+// CHECK-X86_32: Symbols [
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_local_B (47)
+// CHECK-X86_32: Type: Section (0xE)
+// CHECK-X86_32: Section: __text (0x1)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_local_A (93)
+// CHECK-X86_32: Type: Section (0xE)
+// CHECK-X86_32: Section: __text (0x1)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_local_C (1)
+// CHECK-X86_32: Type: Section (0xE)
+// CHECK-X86_32: Section: __text (0x1)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_globl_def_A (123)
+// CHECK-X86_32: Extern
+// CHECK-X86_32: Type: Section (0xE)
+// CHECK-X86_32: Section: __text (0x1)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_globl_def_B (77)
+// CHECK-X86_32: Extern
+// CHECK-X86_32: Type: Section (0xE)
+// CHECK-X86_32: Section: __text (0x1)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_globl_def_C (31)
+// CHECK-X86_32: Extern
+// CHECK-X86_32: Type: Section (0xE)
+// CHECK-X86_32: Section: __text (0x1)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_globl_undef_A (105)
+// CHECK-X86_32: Extern
+// CHECK-X86_32: Type: Undef (0x0)
+// CHECK-X86_32: Section: (0x0)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_globl_undef_B (59)
+// CHECK-X86_32: Extern
+// CHECK-X86_32: Type: Undef (0x0)
+// CHECK-X86_32: Section: (0x0)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Symbol {
+// CHECK-X86_32: Name: sym_globl_undef_C (13)
+// CHECK-X86_32: Extern
+// CHECK-X86_32: Type: Undef (0x0)
+// CHECK-X86_32: Section: (0x0)
+// CHECK-X86_32: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_32: Flags [ (0x0)
+// CHECK-X86_32: ]
+// CHECK-X86_32: Value: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: ]
+// CHECK-X86_32: Indirect Symbols {
+// CHECK-X86_32: Number: 0
+// CHECK-X86_32: Symbols [
+// CHECK-X86_32: ]
+// CHECK-X86_32: }
+// CHECK-X86_32: Segment {
+// CHECK-X86_32: Cmd: LC_SEGMENT
+// CHECK-X86_32: Name:
+// CHECK-X86_32: Size: 124
+// CHECK-X86_32: vmaddr: 0x0
+// CHECK-X86_32: vmsize: 0x4
+// CHECK-X86_32: fileoff: 272
+// CHECK-X86_32: filesize: 4
+// CHECK-X86_32: maxprot: rwx
+// CHECK-X86_32: initprot: rwx
+// CHECK-X86_32: nsects: 1
+// CHECK-X86_32: flags: 0x0
+// CHECK-X86_32: }
+// CHECK-X86_32: Dysymtab {
+// CHECK-X86_32: ilocalsym: 0
+// CHECK-X86_32: nlocalsym: 3
+// CHECK-X86_32: iextdefsym: 3
+// CHECK-X86_32: nextdefsym: 3
+// CHECK-X86_32: iundefsym: 6
+// CHECK-X86_32: nundefsym: 3
+// CHECK-X86_32: tocoff: 0
+// CHECK-X86_32: ntoc: 0
+// CHECK-X86_32: modtaboff: 0
+// CHECK-X86_32: nmodtab: 0
+// CHECK-X86_32: extrefsymoff: 0
+// CHECK-X86_32: nextrefsyms: 0
+// CHECK-X86_32: indirectsymoff: 0
+// CHECK-X86_32: nindirectsyms: 0
+// CHECK-X86_32: extreloff: 0
+// CHECK-X86_32: nextrel: 0
+// CHECK-X86_32: locreloff: 0
+// CHECK-X86_32: nlocrel: 0
+// CHECK-X86_32: }
-// CHECK-X86_64: ('cputype', 16777223)
-// CHECK-X86_64: ('cpusubtype', 3)
-// CHECK-X86_64: ('filetype', 1)
-// CHECK-X86_64: ('num_load_commands', 4)
-// CHECK-X86_64: ('load_commands_size', 272)
-// CHECK-X86_64: ('flag', 0)
-// CHECK-X86_64: ('reserved', 0)
-// CHECK-X86_64: ('load_commands', [
-// CHECK-X86_64: # Load Command 0
-// CHECK-X86_64: (('command', 25)
-// CHECK-X86_64: ('size', 152)
-// CHECK-X86_64: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_64: ('vm_addr', 0)
-// CHECK-X86_64: ('vm_size', 4)
-// CHECK-X86_64: ('file_offset', 304)
-// CHECK-X86_64: ('file_size', 4)
-// CHECK-X86_64: ('maxprot', 7)
-// CHECK-X86_64: ('initprot', 7)
-// CHECK-X86_64: ('num_sections', 1)
-// CHECK-X86_64: ('flags', 0)
-// CHECK-X86_64: ('sections', [
-// CHECK-X86_64: # Section 0
-// CHECK-X86_64: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_64: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_64: ('address', 0)
-// CHECK-X86_64: ('size', 4)
-// CHECK-X86_64: ('offset', 304)
-// CHECK-X86_64: ('alignment', 0)
-// CHECK-X86_64: ('reloc_offset', 0)
-// CHECK-X86_64: ('num_reloc', 0)
-// CHECK-X86_64: ('flags', 0x80000000)
-// CHECK-X86_64: ('reserved1', 0)
-// CHECK-X86_64: ('reserved2', 0)
-// CHECK-X86_64: ('reserved3', 0)
-// CHECK-X86_64: ),
-// CHECK-X86_64: ('_relocations', [
-// CHECK-X86_64: ])
-// CHECK-X86_64: ])
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Load Command 2
-// CHECK-X86_64: (('command', 2)
-// CHECK-X86_64: ('size', 24)
-// CHECK-X86_64: ('symoff', 308)
-// CHECK-X86_64: ('nsyms', 9)
-// CHECK-X86_64: ('stroff', 452)
-// CHECK-X86_64: ('strsize', 140)
-// CHECK-X86_64: ('_string_data', '\x00sym_local_C\x00sym_globl_undef_C\x00sym_globl_def_C\x00sym_local_B\x00sym_globl_undef_B\x00sym_globl_def_B\x00sym_local_A\x00sym_globl_undef_A\x00sym_globl_def_A\x00\x00')
-// CHECK-X86_64: ('_symbols', [
-// CHECK-X86_64: # Symbol 0
-// CHECK-X86_64: (('n_strx', 47)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 1)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_local_B')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 1
-// CHECK-X86_64: (('n_strx', 93)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 1)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_local_A')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 2
-// CHECK-X86_64: (('n_strx', 1)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 1)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_local_C')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 3
-// CHECK-X86_64: (('n_strx', 123)
-// CHECK-X86_64: ('n_type', 0xf)
-// CHECK-X86_64: ('n_sect', 1)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_globl_def_A')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 4
-// CHECK-X86_64: (('n_strx', 77)
-// CHECK-X86_64: ('n_type', 0xf)
-// CHECK-X86_64: ('n_sect', 1)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_globl_def_B')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 5
-// CHECK-X86_64: (('n_strx', 31)
-// CHECK-X86_64: ('n_type', 0xf)
-// CHECK-X86_64: ('n_sect', 1)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_globl_def_C')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 6
-// CHECK-X86_64: (('n_strx', 105)
-// CHECK-X86_64: ('n_type', 0x1)
-// CHECK-X86_64: ('n_sect', 0)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_globl_undef_A')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 7
-// CHECK-X86_64: (('n_strx', 59)
-// CHECK-X86_64: ('n_type', 0x1)
-// CHECK-X86_64: ('n_sect', 0)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_globl_undef_B')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 8
-// CHECK-X86_64: (('n_strx', 13)
-// CHECK-X86_64: ('n_type', 0x1)
-// CHECK-X86_64: ('n_sect', 0)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'sym_globl_undef_C')
-// CHECK-X86_64: ),
-// CHECK-X86_64: ])
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Load Command 3
-// CHECK-X86_64: (('command', 11)
-// CHECK-X86_64: ('size', 80)
-// CHECK-X86_64: ('ilocalsym', 0)
-// CHECK-X86_64: ('nlocalsym', 3)
-// CHECK-X86_64: ('iextdefsym', 3)
-// CHECK-X86_64: ('nextdefsym', 3)
-// CHECK-X86_64: ('iundefsym', 6)
-// CHECK-X86_64: ('nundefsym', 3)
-// CHECK-X86_64: ('tocoff', 0)
-// CHECK-X86_64: ('ntoc', 0)
-// CHECK-X86_64: ('modtaboff', 0)
-// CHECK-X86_64: ('nmodtab', 0)
-// CHECK-X86_64: ('extrefsymoff', 0)
-// CHECK-X86_64: ('nextrefsyms', 0)
-// CHECK-X86_64: ('indirectsymoff', 0)
-// CHECK-X86_64: ('nindirectsyms', 0)
-// CHECK-X86_64: ('extreloff', 0)
-// CHECK-X86_64: ('nextrel', 0)
-// CHECK-X86_64: ('locreloff', 0)
-// CHECK-X86_64: ('nlocrel', 0)
-// CHECK-X86_64: ('_indirect_symbols', [
-// CHECK-X86_64: ])
-// CHECK-X86_64: ),
-// CHECK-X86_64: ])
+// CHECK-X86_64: File: <stdin>
+// CHECK-X86_64: Format: Mach-O 64-bit x86-64
+// CHECK-X86_64: Arch: x86_64
+// CHECK-X86_64: AddressSize: 64bit
+// CHECK-X86_64: MachHeader {
+// CHECK-X86_64: Magic: Magic64 (0xFEEDFACF)
+// CHECK-X86_64: CpuType: X86-64 (0x1000007)
+// CHECK-X86_64: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK-X86_64: FileType: Relocatable (0x1)
+// CHECK-X86_64: NumOfLoadCommands: 4
+// CHECK-X86_64: SizeOfLoadCommands: 272
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Reserved: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Sections [
+// CHECK-X86_64: Section {
+// CHECK-X86_64: Index: 0
+// CHECK-X86_64: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK-X86_64: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK-X86_64: Address: 0x0
+// CHECK-X86_64: Size: 0x4
+// CHECK-X86_64: Offset: 304
+// CHECK-X86_64: Alignment: 0
+// CHECK-X86_64: RelocationOffset: 0x0
+// CHECK-X86_64: RelocationCount: 0
+// CHECK-X86_64: Type: 0x0
+// CHECK-X86_64: Attributes [ (0x800000)
+// CHECK-X86_64: PureInstructions (0x800000)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Reserved1: 0x0
+// CHECK-X86_64: Reserved2: 0x0
+// CHECK-X86_64: Reserved3: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: ]
+// CHECK-X86_64: Relocations [
+// CHECK-X86_64: ]
+// CHECK-X86_64: Symbols [
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_local_B (47)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __text (0x1)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_local_A (93)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __text (0x1)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_local_C (1)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __text (0x1)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_globl_def_A (123)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __text (0x1)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_globl_def_B (77)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __text (0x1)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_globl_def_C (31)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __text (0x1)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_globl_undef_A (105)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Undef (0x0)
+// CHECK-X86_64: Section: (0x0)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_globl_undef_B (59)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Undef (0x0)
+// CHECK-X86_64: Section: (0x0)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: sym_globl_undef_C (13)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Undef (0x0)
+// CHECK-X86_64: Section: (0x0)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: ]
+// CHECK-X86_64: Indirect Symbols {
+// CHECK-X86_64: Number: 0
+// CHECK-X86_64: Symbols [
+// CHECK-X86_64: ]
+// CHECK-X86_64: }
+// CHECK-X86_64: Segment {
+// CHECK-X86_64: Cmd: LC_SEGMENT_64
+// CHECK-X86_64: Name:
+// CHECK-X86_64: Size: 152
+// CHECK-X86_64: vmaddr: 0x0
+// CHECK-X86_64: vmsize: 0x4
+// CHECK-X86_64: fileoff: 304
+// CHECK-X86_64: filesize: 4
+// CHECK-X86_64: maxprot: rwx
+// CHECK-X86_64: initprot: rwx
+// CHECK-X86_64: nsects: 1
+// CHECK-X86_64: flags: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Dysymtab {
+// CHECK-X86_64: ilocalsym: 0
+// CHECK-X86_64: nlocalsym: 3
+// CHECK-X86_64: iextdefsym: 3
+// CHECK-X86_64: nextdefsym: 3
+// CHECK-X86_64: iundefsym: 6
+// CHECK-X86_64: nundefsym: 3
+// CHECK-X86_64: tocoff: 0
+// CHECK-X86_64: ntoc: 0
+// CHECK-X86_64: modtaboff: 0
+// CHECK-X86_64: nmodtab: 0
+// CHECK-X86_64: extrefsymoff: 0
+// CHECK-X86_64: nextrefsyms: 0
+// CHECK-X86_64: indirectsymoff: 0
+// CHECK-X86_64: nindirectsyms: 0
+// CHECK-X86_64: extreloff: 0
+// CHECK-X86_64: nextrel: 0
+// CHECK-X86_64: locreloff: 0
+// CHECK-X86_64: nlocrel: 0
+// CHECK-X86_64: }
Modified: llvm/trunk/test/MC/MachO/tbss.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/tbss.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/tbss.s (original)
+++ llvm/trunk/test/MC/MachO/tbss.s Wed Sep 9 20:50:00 2015
@@ -1,114 +1,122 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.tbss _a$tlv$init, 4
.tbss _b$tlv$init, 4, 3
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// 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', 12)
-// CHECK: ('file_offset', 368)
-// CHECK: ('file_size', 0)
-// 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', 0)
-// CHECK: ('offset', 368)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '')
-// CHECK: # Section 1
-// CHECK: (('section_name', '__thread_bss\x00\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 0)
-// CHECK: ('size', 12)
-// CHECK: ('offset', 0)
-// CHECK: ('alignment', 3)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x12)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', 'cffaedfe 07000001 03000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 1
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 368)
-// CHECK: ('nsyms', 2)
-// CHECK: ('stroff', 400)
-// CHECK: ('strsize', 28)
-// CHECK: ('_string_data', '\x00_b$tlv$init\x00_a$tlv$init\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 13)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_a$tlv$init')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 8)
-// CHECK: ('_string', '_b$tlv$init')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 2)
-// CHECK: ('iextdefsym', 2)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 2)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 3
+// CHECK: SizeOfLoadCommands: 336
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 368
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __thread_bss (5F 5F 74 68 72 65 61 64 5F 62 73 73 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0xC
+// CHECK: Offset: 0
+// CHECK: Alignment: 3
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x12
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: CFFAEDFE 07000001 03000000 |............|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _a$tlv$init (13)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_bss (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _b$tlv$init (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_bss (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x8
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 232
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0xC
+// CHECK: fileoff: 368
+// CHECK: filesize: 0
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 2
+// CHECK: iextdefsym: 2
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 2
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/tdata.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/tdata.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/tdata.s (original)
+++ llvm/trunk/test/MC/MachO/tdata.s Wed Sep 9 20:50:00 2015
@@ -1,106 +1,113 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.tdata
_a$tlv$init:
.long 4
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// 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', 4)
-// CHECK: ('file_offset', 368)
-// CHECK: ('file_size', 4)
-// 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', 0)
-// CHECK: ('offset', 368)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '')
-// CHECK: # Section 1
-// CHECK: (('section_name', '__thread_data\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 0)
-// CHECK: ('size', 4)
-// CHECK: ('offset', 368)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x11)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '04000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 1
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 372)
-// CHECK: ('nsyms', 1)
-// CHECK: ('stroff', 388)
-// CHECK: ('strsize', 16)
-// CHECK: ('_string_data', '\x00_a$tlv$init\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_a$tlv$init')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 1)
-// CHECK: ('iextdefsym', 1)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 1)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 3
+// CHECK: SizeOfLoadCommands: 336
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 368
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __thread_data (5F 5F 74 68 72 65 61 64 5F 64 61 74 61 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x4
+// CHECK: Offset: 368
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x11
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 04000000 |....|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _a$tlv$init (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 232
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x4
+// CHECK: fileoff: 368
+// CHECK: filesize: 4
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 1
+// CHECK: iextdefsym: 1
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 1
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/thread_init_func.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/thread_init_func.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/thread_init_func.s (original)
+++ llvm/trunk/test/MC/MachO/thread_init_func.s Wed Sep 9 20:50:00 2015
@@ -1,63 +1,77 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -macho-segment | FileCheck %s
.thread_init_func
.quad 0
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 1)
-// CHECK: ('load_commands_size', 232)
-// 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', 8)
-// CHECK: ('file_offset', 264)
-// CHECK: ('file_size', 8)
-// 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', 0)
-// CHECK: ('offset', 264)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '')
-// CHECK: # Section 1
-// CHECK: (('section_name', '__thread_init\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 0)
-// CHECK: ('size', 8)
-// CHECK: ('offset', 264)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x15)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '00000000 00000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 1
+// CHECK: SizeOfLoadCommands: 232
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 264
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __thread_init (5F 5F 74 68 72 65 61 64 5F 69 6E 69 74 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x8
+// CHECK: Offset: 264
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x15
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00000000 00000000 |........|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 232
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x8
+// CHECK: fileoff: 264
+// CHECK: filesize: 8
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/tls.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/tls.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/tls.s (original)
+++ llvm/trunk/test/MC/MachO/tls.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.section __TEXT,__text,regular,pure_instructions
.section __DATA,__thread_data,thread_local_regular
@@ -45,226 +45,246 @@ _b:
.subsections_via_symbols
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 3)
-// CHECK: ('load_commands_size', 496)
-// CHECK: ('flag', 8192)
-// CHECK: ('reserved', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 25)
-// CHECK: ('size', 392)
-// 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', 112)
-// CHECK: ('file_offset', 528)
-// CHECK: ('file_size', 104)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 4)
-// 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', 0)
-// CHECK: ('offset', 528)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '')
-// CHECK: # Section 1
-// CHECK: (('section_name', '__thread_data\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 0)
-// CHECK: ('size', 8)
-// CHECK: ('offset', 528)
-// CHECK: ('alignment', 2)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x11)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '04000000 05000000')
-// CHECK: # Section 2
-// CHECK: (('section_name', '__thread_vars\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 8)
-// CHECK: ('size', 96)
-// CHECK: ('offset', 536)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 632)
-// CHECK: ('num_reloc', 8)
-// CHECK: ('flags', 0x13)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0x58),
-// CHECK: ('word-1', 0xe000001)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0x48),
-// CHECK: ('word-1', 0xe000008)),
-// CHECK: # Relocation 2
-// CHECK: (('word-0', 0x40),
-// CHECK: ('word-1', 0xe000000)),
-// CHECK: # Relocation 3
-// CHECK: (('word-0', 0x30),
-// CHECK: ('word-1', 0xe000008)),
-// CHECK: # Relocation 4
-// CHECK: (('word-0', 0x28),
-// CHECK: ('word-1', 0xe000007)),
-// CHECK: # Relocation 5
-// CHECK: (('word-0', 0x18),
-// CHECK: ('word-1', 0xe000008)),
-// CHECK: # Relocation 6
-// CHECK: (('word-0', 0x10),
-// CHECK: ('word-1', 0xe000005)),
-// CHECK: # Relocation 7
-// CHECK: (('word-0', 0x0),
-// CHECK: ('word-1', 0xe000008)),
-// CHECK: ])
-// CHECK: ('_section_data', '00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000')
-// CHECK: # Section 3
-// CHECK: (('section_name', '__thread_bss\x00\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 104)
-// CHECK: ('size', 8)
-// CHECK: ('offset', 0)
-// CHECK: ('alignment', 2)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x12)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', 'cffaedfe 07000001')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 1
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 696)
-// CHECK: ('nsyms', 9)
-// CHECK: ('stroff', 840)
-// CHECK: ('strsize', 80)
-// CHECK: ('_string_data', '\x00_d$tlv$init\x00_c$tlv$init\x00_b$tlv$init\x00_a$tlv$init\x00___tlv_bootstrap\x00_d\x00_c\x00_b\x00_a\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 37)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 4)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 104)
-// CHECK: ('_string', '_a$tlv$init')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 25)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 4)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 108)
-// CHECK: ('_string', '_b$tlv$init')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 75)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 3)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 56)
-// CHECK: ('_string', '_a')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 72)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 3)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 80)
-// CHECK: ('_string', '_b')
-// CHECK: ),
-// CHECK: # Symbol 4
-// CHECK: (('n_strx', 69)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 3)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 8)
-// CHECK: ('_string', '_c')
-// CHECK: ),
-// CHECK: # Symbol 5
-// CHECK: (('n_strx', 13)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_c$tlv$init')
-// CHECK: ),
-// CHECK: # Symbol 6
-// CHECK: (('n_strx', 66)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 3)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 32)
-// CHECK: ('_string', '_d')
-// CHECK: ),
-// CHECK: # Symbol 7
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 4)
-// CHECK: ('_string', '_d$tlv$init')
-// CHECK: ),
-// CHECK: # Symbol 8
-// CHECK: (('n_strx', 49)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '___tlv_bootstrap')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 2)
-// CHECK: ('iextdefsym', 2)
-// CHECK: ('nextdefsym', 6)
-// CHECK: ('iundefsym', 8)
-// CHECK: ('nundefsym', 1)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 3
+// CHECK: SizeOfLoadCommands: 496
+// CHECK: Flags [ (0x2000)
+// CHECK: MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 528
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __thread_data (5F 5F 74 68 72 65 61 64 5F 64 61 74 61 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x8
+// CHECK: Offset: 528
+// CHECK: Alignment: 2
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x11
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 04000000 05000000 |........|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 2
+// CHECK: Name: __thread_vars (5F 5F 74 68 72 65 61 64 5F 76 61 72 73 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x8
+// CHECK: Size: 0x60
+// CHECK: Offset: 536
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x278
+// CHECK: RelocationCount: 8
+// CHECK: Type: 0x13
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0010: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0020: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0030: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0040: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0050: 00000000 00000000 00000000 00000000 |................|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 3
+// CHECK: Name: __thread_bss (5F 5F 74 68 72 65 61 64 5F 62 73 73 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x68
+// CHECK: Size: 0x8
+// CHECK: Offset: 0
+// CHECK: Alignment: 2
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x12
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: CFFAEDFE 07000001 |........|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __thread_vars {
+// CHECK: 0x58 0 3 1 X86_64_RELOC_UNSIGNED 0 _b$tlv$init
+// CHECK: 0x48 0 3 1 X86_64_RELOC_UNSIGNED 0 ___tlv_bootstrap
+// CHECK: 0x40 0 3 1 X86_64_RELOC_UNSIGNED 0 _a$tlv$init
+// CHECK: 0x30 0 3 1 X86_64_RELOC_UNSIGNED 0 ___tlv_bootstrap
+// CHECK: 0x28 0 3 1 X86_64_RELOC_UNSIGNED 0 _d$tlv$init
+// CHECK: 0x18 0 3 1 X86_64_RELOC_UNSIGNED 0 ___tlv_bootstrap
+// CHECK: 0x10 0 3 1 X86_64_RELOC_UNSIGNED 0 _c$tlv$init
+// CHECK: 0x0 0 3 1 X86_64_RELOC_UNSIGNED 0 ___tlv_bootstrap
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _a$tlv$init (37)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_bss (0x4)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x68
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _b$tlv$init (25)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_bss (0x4)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x6C
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _a (75)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_vars (0x3)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x38
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _b (72)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_vars (0x3)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x50
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _c (69)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_vars (0x3)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x8
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _c$tlv$init (13)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _d (66)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_vars (0x3)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x20
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _d$tlv$init (1)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x4
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: ___tlv_bootstrap (49)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 392
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x70
+// CHECK: fileoff: 528
+// CHECK: filesize: 104
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 4
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 2
+// CHECK: iextdefsym: 2
+// CHECK: nextdefsym: 6
+// CHECK: iundefsym: 8
+// CHECK: nundefsym: 1
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/tlv-bss.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/tlv-bss.ll?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/tlv-bss.ll (original)
+++ llvm/trunk/test/MC/MachO/tlv-bss.ll Wed Sep 9 20:50:00 2015
@@ -1,11 +1,16 @@
-; RUN: llc -O0 -mtriple=x86_64-apple-darwin12 -filetype=obj -o - %s | macho-dump | FileCheck %s
+; RUN: llc -O0 -mtriple=x86_64-apple-darwin12 -filetype=obj -o - %s | llvm-readobj -s | FileCheck %s
; Test that we emit weak_odr thread_locals correctly into the thread_bss section
; PR15972
-; CHECK: __thread_bss
-; CHECK: 'size', 8
-; CHECK: 'alignment', 3
-; CHECK: __thread_vars
+; CHECK: Section {
+; CHECK: Index: 1
+; CHECK: Name: __thread_bss (5F 5F 74 68 72 65 61 64 5F 62 73 73 00 00 00 00)
+; CHECK: Size: 0x8
+; CHECK: Alignment: 3
+; CHECK: }
+; CHECK: Section {
+; CHECK: Index: 2
+; CHECK: Name: __thread_vars (5F 5F 74 68 72 65 61 64 5F 76 61 72 73 00 00 00)
; Generated from this C++ source
; template<class T>
Modified: llvm/trunk/test/MC/MachO/tlv-reloc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/tlv-reloc.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/tlv-reloc.s (original)
+++ llvm/trunk/test/MC/MachO/tlv-reloc.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.tdata
_a$tlv$init:
@@ -21,154 +21,171 @@ _foo:
call *(%rdi) # returns &a in %rax
ret
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 3)
-// CHECK: ('load_commands_size', 416)
-// CHECK: ('flag', 0)
-// CHECK: ('reserved', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 25)
-// CHECK: ('size', 312)
-// 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', 38)
-// CHECK: ('file_offset', 448)
-// CHECK: ('file_size', 38)
-// CHECK: ('maxprot', 7)
-// CHECK: ('initprot', 7)
-// CHECK: ('num_sections', 3)
-// 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', 10)
-// CHECK: ('offset', 448)
-// CHECK: ('alignment', 4)
-// CHECK: ('reloc_offset', 488)
-// CHECK: ('num_reloc', 1)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0x3),
-// CHECK: ('word-1', 0x9d000001)),
-// CHECK: ])
-// CHECK: ('_section_data', '488b3d00 000000ff 17c3')
-// CHECK: # Section 1
-// CHECK: (('section_name', '__thread_data\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 10)
-// CHECK: ('size', 4)
-// CHECK: ('offset', 458)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x11)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '04000000')
-// CHECK: # Section 2
-// CHECK: (('section_name', '__thread_vars\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 14)
-// CHECK: ('size', 24)
-// CHECK: ('offset', 462)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 496)
-// CHECK: ('num_reloc', 2)
-// CHECK: ('flags', 0x13)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('word-0', 0x10),
-// CHECK: ('word-1', 0xe000000)),
-// CHECK: # Relocation 1
-// CHECK: (('word-0', 0x0),
-// CHECK: ('word-1', 0xe000003)),
-// CHECK: ])
-// CHECK: ('_section_data', '00000000 00000000 00000000 00000000 00000000 00000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 1
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 512)
-// CHECK: ('nsyms', 4)
-// CHECK: ('stroff', 576)
-// CHECK: ('strsize', 40)
-// CHECK: ('_string_data', '\x00_a$tlv$init\x00__tlv_bootstrap\x00_foo\x00_a\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 10)
-// CHECK: ('_string', '_a$tlv$init')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 34)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 3)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 14)
-// CHECK: ('_string', '_a')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 29)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_foo')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 13)
-// CHECK: ('n_type', 0x1)
-// CHECK: ('n_sect', 0)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '__tlv_bootstrap')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 1)
-// CHECK: ('iextdefsym', 1)
-// CHECK: ('nextdefsym', 2)
-// CHECK: ('iundefsym', 3)
-// CHECK: ('nundefsym', 1)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 3
+// CHECK: SizeOfLoadCommands: 416
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0xA
+// CHECK: Offset: 448
+// CHECK: Alignment: 4
+// CHECK: RelocationOffset: 0x1E8
+// CHECK: RelocationCount: 1
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 488B3D00 000000FF 17C3 |H.=.......|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __thread_data (5F 5F 74 68 72 65 61 64 5F 64 61 74 61 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0xA
+// CHECK: Size: 0x4
+// CHECK: Offset: 458
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x11
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 04000000 |....|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 2
+// CHECK: Name: __thread_vars (5F 5F 74 68 72 65 61 64 5F 76 61 72 73 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0xE
+// CHECK: Size: 0x18
+// CHECK: Offset: 462
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x1F0
+// CHECK: RelocationCount: 2
+// CHECK: Type: 0x13
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0010: 00000000 00000000 |........|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: Section __text {
+// CHECK: 0x3 1 2 1 X86_64_RELOC_TLV 0 _a
+// CHECK: }
+// CHECK: Section __thread_vars {
+// CHECK: 0x10 0 3 1 X86_64_RELOC_UNSIGNED 0 _a$tlv$init
+// CHECK: 0x0 0 3 1 X86_64_RELOC_UNSIGNED 0 __tlv_bootstrap
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _a$tlv$init (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0xA
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _a (34)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_vars (0x3)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0xE
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _foo (29)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: __tlv_bootstrap (13)
+// CHECK: Extern
+// CHECK: Type: Undef (0x0)
+// CHECK: Section: (0x0)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 312
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x26
+// CHECK: fileoff: 448
+// CHECK: filesize: 38
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 3
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 1
+// CHECK: iextdefsym: 1
+// CHECK: nextdefsym: 2
+// CHECK: iundefsym: 3
+// CHECK: nundefsym: 1
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/tlv.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/tlv.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/tlv.s (original)
+++ llvm/trunk/test/MC/MachO/tlv.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.tlv
.globl _a
@@ -7,104 +7,113 @@ _a:
.quad 0
.quad 0
-// CHECK: ('cputype', 16777223)
-// CHECK: ('cpusubtype', 3)
-// 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', 24)
-// CHECK: ('file_offset', 368)
-// CHECK: ('file_size', 24)
-// 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', 0)
-// CHECK: ('offset', 368)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '')
-// CHECK: # Section 1
-// CHECK: (('section_name', '__thread_vars\x00\x00\x00')
-// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK: ('address', 0)
-// CHECK: ('size', 24)
-// CHECK: ('offset', 368)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x13)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ('reserved3', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '00000000 00000000 00000000 00000000 00000000 00000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 1
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 392)
-// CHECK: ('nsyms', 1)
-// CHECK: ('stroff', 408)
-// CHECK: ('strsize', 4)
-// CHECK: ('_string_data', '\x00_a\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 0)
-// CHECK: ('_string', '_a')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 0)
-// CHECK: ('iextdefsym', 0)
-// CHECK: ('nextdefsym', 1)
-// CHECK: ('iundefsym', 1)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic64 (0xFEEDFACF)
+// CHECK: CpuType: X86-64 (0x1000007)
+// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 3
+// CHECK: SizeOfLoadCommands: 336
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Reserved: 0x0
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x0
+// CHECK: Offset: 368
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __thread_vars (5F 5F 74 68 72 65 61 64 5F 76 61 72 73 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x18
+// CHECK: Offset: 368
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x13
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: Reserved3: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00000000 00000000 00000000 00000000 |................|
+// CHECK: 0010: 00000000 00000000 |........|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _a (1)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __thread_vars (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT_64
+// CHECK: Name:
+// CHECK: Size: 232
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x18
+// CHECK: fileoff: 368
+// CHECK: filesize: 24
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 0
+// CHECK: iextdefsym: 0
+// CHECK: nextdefsym: 1
+// CHECK: iundefsym: 1
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/values.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/values.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/values.s (original)
+++ llvm/trunk/test/MC/MachO/values.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.long 0
text_def_int:
@@ -17,119 +17,132 @@ data_def_int:
data_def_ext:
.long 0
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 312)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 192)
-// 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', 24)
-// CHECK: ('file_offset', 340)
-// CHECK: ('file_size', 24)
-// 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', 12)
-// CHECK: ('offset', 340)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000000)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// 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', 12)
-// CHECK: ('size', 12)
-// CHECK: ('offset', 352)
-// CHECK: ('alignment', 0)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x0)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 364)
-// CHECK: ('nsyms', 4)
-// CHECK: ('stroff', 412)
-// CHECK: ('strsize', 56)
-// CHECK: ('_string_data', '\x00text_def_ext\x00data_def_ext\x00text_def_int\x00data_def_int\x00\x00\x00\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 27)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 4)
-// CHECK: ('_string', 'text_def_int')
-// CHECK: ),
-// CHECK: # Symbol 1
-// CHECK: (('n_strx', 40)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 16)
-// CHECK: ('_string', 'data_def_int')
-// CHECK: ),
-// CHECK: # Symbol 2
-// CHECK: (('n_strx', 14)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 20)
-// CHECK: ('_string', 'data_def_ext')
-// CHECK: ),
-// CHECK: # Symbol 3
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xf)
-// CHECK: ('n_sect', 1)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 8)
-// CHECK: ('_string', 'text_def_ext')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 2)
-// CHECK: ('iextdefsym', 2)
-// CHECK: ('nextdefsym', 2)
-// CHECK: ('iundefsym', 4)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 312
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0xC
+// CHECK: Offset: 340
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800000)
+// CHECK: PureInstructions (0x800000)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0xC
+// CHECK: Size: 0xC
+// CHECK: Offset: 352
+// CHECK: Alignment: 0
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: text_def_int (27)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x4
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: data_def_int (40)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x10
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: data_def_ext (14)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __data (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x14
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: text_def_ext (1)
+// CHECK: Extern
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __text (0x1)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x8
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 192
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x18
+// CHECK: fileoff: 340
+// CHECK: filesize: 24
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 2
+// CHECK: iextdefsym: 2
+// CHECK: nextdefsym: 2
+// CHECK: iundefsym: 4
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
Modified: llvm/trunk/test/MC/MachO/variable-exprs.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/variable-exprs.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/variable-exprs.s (original)
+++ llvm/trunk/test/MC/MachO/variable-exprs.s Wed Sep 9 20:50:00 2015
@@ -1,9 +1,9 @@
// RUN: llvm-mc -triple i386-apple-darwin10 %s -filetype=obj -o %t.o
-// RUN: macho-dump --dump-section-data < %t.o > %t.dump
+// RUN: llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols < %t.o > %t.dump
// RUN: FileCheck --check-prefix=CHECK-I386 < %t.dump %s
// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o %t.o
-// RUN: macho-dump --dump-section-data < %t.o > %t.dump
+// RUN: llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols < %t.o > %t.dump
// RUN: FileCheck --check-prefix=CHECK-X86_64 < %t.dump %s
.data
@@ -46,401 +46,417 @@ Lt0_b:
Lt0_x = Lt0_a - Lt0_b
.quad Lt0_x
-// CHECK-I386: ('cputype', 7)
-// CHECK-I386: ('cpusubtype', 3)
-// CHECK-I386: ('filetype', 1)
-// CHECK-I386: ('num_load_commands', 4)
-// CHECK-I386: ('load_commands_size', 312)
-// CHECK-I386: ('flag', 0)
-// CHECK-I386: ('load_commands', [
-// CHECK-I386: # Load Command 0
-// CHECK-I386: (('command', 1)
-// CHECK-I386: ('size', 192)
-// CHECK-I386: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-I386: ('vm_addr', 0)
-// CHECK-I386: ('vm_size', 57)
-// CHECK-I386: ('file_offset', 340)
-// CHECK-I386: ('file_size', 57)
-// CHECK-I386: ('maxprot', 7)
-// CHECK-I386: ('initprot', 7)
-// CHECK-I386: ('num_sections', 2)
-// CHECK-I386: ('flags', 0)
-// CHECK-I386: ('sections', [
-// CHECK-I386: # Section 0
-// CHECK-I386: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-I386: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-I386: ('address', 0)
-// CHECK-I386: ('size', 1)
-// CHECK-I386: ('offset', 340)
-// CHECK-I386: ('alignment', 0)
-// CHECK-I386: ('reloc_offset', 0)
-// CHECK-I386: ('num_reloc', 0)
-// CHECK-I386: ('flags', 0x80000400)
-// CHECK-I386: ('reserved1', 0)
-// CHECK-I386: ('reserved2', 0)
-// CHECK-I386: ),
-// CHECK-I386: ('_relocations', [
-// CHECK-I386: ])
-// CHECK-I386: ('_section_data', 'c3')
-// CHECK-I386: # Section 1
-// CHECK-I386: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-I386: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-I386: ('address', 1)
-// CHECK-I386: ('size', 56)
-// CHECK-I386: ('offset', 341)
-// CHECK-I386: ('alignment', 0)
-// CHECK-I386: ('reloc_offset', 400)
-// CHECK-I386: ('num_reloc', 9)
-// CHECK-I386: ('flags', 0x0)
-// CHECK-I386: ('reserved1', 0)
-// CHECK-I386: ('reserved2', 0)
-// CHECK-I386: ),
-// CHECK-I386: ('_relocations', [
-// CHECK-I386: # Relocation 0
-// CHECK-I386: (('word-0', 0x2c),
-// CHECK-I386: ('word-1', 0x4000002)),
-// CHECK-I386: # Relocation 1
-// CHECK-I386: (('word-0', 0x28),
-// CHECK-I386: ('word-1', 0x4000002)),
-// CHECK-I386: # Relocation 2
-// CHECK-I386: (('word-0', 0x24),
-// CHECK-I386: ('word-1', 0xc000009)),
-// CHECK-I386: # Relocation 3
-// CHECK-I386: (('word-0', 0x20),
-// CHECK-I386: ('word-1', 0xc000008)),
-// CHECK-I386: # Relocation 4
-// CHECK-I386: (('word-0', 0x1c),
-// CHECK-I386: ('word-1', 0xc000007)),
-// CHECK-I386: # Relocation 5
-// CHECK-I386: (('word-0', 0xa0000018),
-// CHECK-I386: ('word-1', 0x5)),
-// CHECK-I386: # Relocation 6
-// CHECK-I386: (('word-0', 0x14),
-// CHECK-I386: ('word-1', 0x4000002)),
-// CHECK-I386: # Relocation 7
-// CHECK-I386: (('word-0', 0x10),
-// CHECK-I386: ('word-1', 0x4000002)),
-// CHECK-I386: # Relocation 8
-// CHECK-I386: (('word-0', 0x8),
-// CHECK-I386: ('word-1', 0x4000002)),
-// CHECK-I386: ])
-// CHECK-I386: ('_section_data', '00000000 00000000 05000000 00000000 05000000 09000000 09000000 00000000 00000000 00000000 0d000000 0d000000 cfffffff ffffffff')
-// CHECK-I386: ])
-// CHECK-I386: ),
-// CHECK-I386: # Load Command 2
-// CHECK-I386: (('command', 2)
-// CHECK-I386: ('size', 24)
-// CHECK-I386: ('symoff', 472)
-// CHECK-I386: ('nsyms', 10)
-// CHECK-I386: ('stroff', 592)
-// CHECK-I386: ('strsize', 24)
-// CHECK-I386: ('_string_data', '\x00g\x00f\x00e\x00d\x00c\x00b\x00a\x00d3\x00d2\x00t0\x00')
-// CHECK-I386: ('_symbols', [
-// CHECK-I386: # Symbol 0
-// CHECK-I386: (('n_strx', 13)
-// CHECK-I386: ('n_type', 0xe)
-// CHECK-I386: ('n_sect', 2)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 5)
-// CHECK-I386: ('_string', 'a')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 1
-// CHECK-I386: (('n_strx', 11)
-// CHECK-I386: ('n_type', 0xe)
-// CHECK-I386: ('n_sect', 2)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 5)
-// CHECK-I386: ('_string', 'b')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 2
-// CHECK-I386: (('n_strx', 9)
-// CHECK-I386: ('n_type', 0xe)
-// CHECK-I386: ('n_sect', 2)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 9)
-// CHECK-I386: ('_string', 'c')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 3
-// CHECK-I386: (('n_strx', 5)
-// CHECK-I386: ('n_type', 0xe)
-// CHECK-I386: ('n_sect', 2)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 9)
-// CHECK-I386: ('_string', 'e')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 4
-// CHECK-I386: (('n_strx', 1)
-// CHECK-I386: ('n_type', 0xe)
-// CHECK-I386: ('n_sect', 2)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 13)
-// CHECK-I386: ('_string', 'g')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 5
-// CHECK-I386: (('n_strx', 3)
-// CHECK-I386: ('n_type', 0xe)
-// CHECK-I386: ('n_sect', 2)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 13)
-// CHECK-I386: ('_string', 'f')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 6
-// CHECK-I386: (('n_strx', 21)
-// CHECK-I386: ('n_type', 0xe)
-// CHECK-I386: ('n_sect', 1)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 0)
-// CHECK-I386: ('_string', 't0')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 7
-// CHECK-I386: (('n_strx', 7)
-// CHECK-I386: ('n_type', 0x1)
-// CHECK-I386: ('n_sect', 0)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 0)
-// CHECK-I386: ('_string', 'd')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 8
-// CHECK-I386: (('n_strx', 18)
-// CHECK-I386: ('n_type', 0xb)
-// CHECK-I386: ('n_sect', 0)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 7)
-// CHECK-I386: ('_string', 'd2')
-// CHECK-I386: ),
-// CHECK-I386: # Symbol 9
-// CHECK-I386: (('n_strx', 15)
-// CHECK-I386: ('n_type', 0x1)
-// CHECK-I386: ('n_sect', 0)
-// CHECK-I386: ('n_desc', 0)
-// CHECK-I386: ('n_value', 0)
-// CHECK-I386: ('_string', 'd3')
-// CHECK-I386: ),
-// CHECK-I386: ])
-// CHECK-I386: ),
-// CHECK-I386: # Load Command 3
-// CHECK-I386: (('command', 11)
-// CHECK-I386: ('size', 80)
-// CHECK-I386: ('ilocalsym', 0)
-// CHECK-I386: ('nlocalsym', 7)
-// CHECK-I386: ('iextdefsym', 7)
-// CHECK-I386: ('nextdefsym', 0)
-// CHECK-I386: ('iundefsym', 7)
-// CHECK-I386: ('nundefsym', 3)
-// CHECK-I386: ('tocoff', 0)
-// CHECK-I386: ('ntoc', 0)
-// CHECK-I386: ('modtaboff', 0)
-// CHECK-I386: ('nmodtab', 0)
-// CHECK-I386: ('extrefsymoff', 0)
-// CHECK-I386: ('nextrefsyms', 0)
-// CHECK-I386: ('indirectsymoff', 0)
-// CHECK-I386: ('nindirectsyms', 0)
-// CHECK-I386: ('extreloff', 0)
-// CHECK-I386: ('nextrel', 0)
-// CHECK-I386: ('locreloff', 0)
-// CHECK-I386: ('nlocrel', 0)
-// CHECK-I386: ('_indirect_symbols', [
-// CHECK-I386: ])
-// CHECK-I386: ),
-// CHECK-I386: ])
-
-// CHECK-X86_64: ('cputype', 16777223)
-// CHECK-X86_64: ('cpusubtype', 3)
-// CHECK-X86_64: ('filetype', 1)
-// CHECK-X86_64: ('num_load_commands', 4)
-// CHECK-X86_64: ('load_commands_size', 352)
-// CHECK-X86_64: ('flag', 0)
-// CHECK-X86_64: ('reserved', 0)
-// CHECK-X86_64: ('load_commands', [
-// CHECK-X86_64: # Load Command 0
-// CHECK-X86_64: (('command', 25)
-// CHECK-X86_64: ('size', 232)
-// CHECK-X86_64: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_64: ('vm_addr', 0)
-// CHECK-X86_64: ('vm_size', 57)
-// CHECK-X86_64: ('file_offset', 384)
-// CHECK-X86_64: ('file_size', 57)
-// CHECK-X86_64: ('maxprot', 7)
-// CHECK-X86_64: ('initprot', 7)
-// CHECK-X86_64: ('num_sections', 2)
-// CHECK-X86_64: ('flags', 0)
-// CHECK-X86_64: ('sections', [
-// CHECK-X86_64: # Section 0
-// CHECK-X86_64: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_64: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_64: ('address', 0)
-// CHECK-X86_64: ('size', 1)
-// CHECK-X86_64: ('offset', 384)
-// CHECK-X86_64: ('alignment', 0)
-// CHECK-X86_64: ('reloc_offset', 0)
-// CHECK-X86_64: ('num_reloc', 0)
-// CHECK-X86_64: ('flags', 0x80000400)
-// CHECK-X86_64: ('reserved1', 0)
-// CHECK-X86_64: ('reserved2', 0)
-// CHECK-X86_64: ('reserved3', 0)
-// CHECK-X86_64: ),
-// CHECK-X86_64: ('_relocations', [
-// CHECK-X86_64: ])
-// CHECK-X86_64: ('_section_data', 'c3')
-// CHECK-X86_64: # Section 1
-// CHECK-X86_64: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_64: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-X86_64: ('address', 1)
-// CHECK-X86_64: ('size', 56)
-// CHECK-X86_64: ('offset', 385)
-// CHECK-X86_64: ('alignment', 0)
-// CHECK-X86_64: ('reloc_offset', 444)
-// CHECK-X86_64: ('num_reloc', 9)
-// CHECK-X86_64: ('flags', 0x0)
-// CHECK-X86_64: ('reserved1', 0)
-// CHECK-X86_64: ('reserved2', 0)
-// CHECK-X86_64: ('reserved3', 0)
-// CHECK-X86_64: ),
-// CHECK-X86_64: ('_relocations', [
-// CHECK-X86_64: # Relocation 0
-// CHECK-X86_64: (('word-0', 0x2c),
-// CHECK-X86_64: ('word-1', 0xc000004)),
-// CHECK-X86_64: # Relocation 1
-// CHECK-X86_64: (('word-0', 0x28),
-// CHECK-X86_64: ('word-1', 0xc000005)),
-// CHECK-X86_64: # Relocation 2
-// CHECK-X86_64: (('word-0', 0x24),
-// CHECK-X86_64: ('word-1', 0xc000009)),
-// CHECK-X86_64: # Relocation 3
-// CHECK-X86_64: (('word-0', 0x20),
-// CHECK-X86_64: ('word-1', 0xc000008)),
-// CHECK-X86_64: # Relocation 4
-// CHECK-X86_64: (('word-0', 0x1c),
-// CHECK-X86_64: ('word-1', 0xc000007)),
-// CHECK-X86_64: # Relocation 5
-// CHECK-X86_64: (('word-0', 0x18),
-// CHECK-X86_64: ('word-1', 0xc000000)),
-// CHECK-X86_64: # Relocation 6
-// CHECK-X86_64: (('word-0', 0x14),
-// CHECK-X86_64: ('word-1', 0xc000003)),
-// CHECK-X86_64: # Relocation 7
-// CHECK-X86_64: (('word-0', 0x10),
-// CHECK-X86_64: ('word-1', 0xc000001)),
-// CHECK-X86_64: # Relocation 8
-// CHECK-X86_64: (('word-0', 0x8),
-// CHECK-X86_64: ('word-1', 0xc000001)),
-// CHECK-X86_64: ])
-// CHECK-X86_64: ('_section_data', '00000000 00000000 00000000 00000000 00000000 00000000 04000000 00000000 00000000 00000000 00000000 00000000 cfffffff ffffffff')
-// CHECK-X86_64: ])
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Load Command 2
-// CHECK-X86_64: (('command', 2)
-// CHECK-X86_64: ('size', 24)
-// CHECK-X86_64: ('symoff', 516)
-// CHECK-X86_64: ('nsyms', 10)
-// CHECK-X86_64: ('stroff', 676)
-// CHECK-X86_64: ('strsize', 24)
-// CHECK-X86_64: ('_string_data', '\x00g\x00f\x00e\x00d\x00c\x00b\x00a\x00d3\x00d2\x00t0\x00')
-// CHECK-X86_64: ('_symbols', [
-// CHECK-X86_64: # Symbol 0
-// CHECK-X86_64: (('n_strx', 13)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 2)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 5)
-// CHECK-X86_64: ('_string', 'a')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 1
-// CHECK-X86_64: (('n_strx', 11)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 2)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 5)
-// CHECK-X86_64: ('_string', 'b')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 2
-// CHECK-X86_64: (('n_strx', 9)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 2)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 9)
-// CHECK-X86_64: ('_string', 'c')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 3
-// CHECK-X86_64: (('n_strx', 5)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 2)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 9)
-// CHECK-X86_64: ('_string', 'e')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 4
-// CHECK-X86_64: (('n_strx', 1)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 2)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 13)
-// CHECK-X86_64: ('_string', 'g')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 5
-// CHECK-X86_64: (('n_strx', 3)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 2)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 13)
-// CHECK-X86_64: ('_string', 'f')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 6
-// CHECK-X86_64: (('n_strx', 21)
-// CHECK-X86_64: ('n_type', 0xe)
-// CHECK-X86_64: ('n_sect', 1)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 't0')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 7
-// CHECK-X86_64: (('n_strx', 7)
-// CHECK-X86_64: ('n_type', 0x1)
-// CHECK-X86_64: ('n_sect', 0)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'd')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 8
-// CHECK-X86_64: (('n_strx', 18)
-// CHECK-X86_64: ('n_type', 0xb)
-// CHECK-X86_64: ('n_sect', 0)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 7)
-// CHECK-X86_64: ('_string', 'd2')
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Symbol 9
-// CHECK-X86_64: (('n_strx', 15)
-// CHECK-X86_64: ('n_type', 0x1)
-// CHECK-X86_64: ('n_sect', 0)
-// CHECK-X86_64: ('n_desc', 0)
-// CHECK-X86_64: ('n_value', 0)
-// CHECK-X86_64: ('_string', 'd3')
-// CHECK-X86_64: ),
-// CHECK-X86_64: ])
-// CHECK-X86_64: ),
-// CHECK-X86_64: # Load Command 3
-// CHECK-X86_64: (('command', 11)
-// CHECK-X86_64: ('size', 80)
-// CHECK-X86_64: ('ilocalsym', 0)
-// CHECK-X86_64: ('nlocalsym', 7)
-// CHECK-X86_64: ('iextdefsym', 7)
-// CHECK-X86_64: ('nextdefsym', 0)
-// CHECK-X86_64: ('iundefsym', 7)
-// CHECK-X86_64: ('nundefsym', 3)
-// CHECK-X86_64: ('tocoff', 0)
-// CHECK-X86_64: ('ntoc', 0)
-// CHECK-X86_64: ('modtaboff', 0)
-// CHECK-X86_64: ('nmodtab', 0)
-// CHECK-X86_64: ('extrefsymoff', 0)
-// CHECK-X86_64: ('nextrefsyms', 0)
-// CHECK-X86_64: ('indirectsymoff', 0)
-// CHECK-X86_64: ('nindirectsyms', 0)
-// CHECK-X86_64: ('extreloff', 0)
-// CHECK-X86_64: ('nextrel', 0)
-// CHECK-X86_64: ('locreloff', 0)
-// CHECK-X86_64: ('nlocrel', 0)
-// CHECK-X86_64: ('_indirect_symbols', [
-// CHECK-X86_64: ])
-// CHECK-X86_64: ),
-// CHECK-X86_64: ])
+// CHECK-I386: File: <stdin>
+// CHECK-I386: Format: Mach-O 32-bit i386
+// CHECK-I386: Arch: i386
+// CHECK-I386: AddressSize: 32bit
+// CHECK-I386: MachHeader {
+// CHECK-I386: Magic: Magic (0xFEEDFACE)
+// CHECK-I386: CpuType: X86 (0x7)
+// CHECK-I386: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK-I386: FileType: Relocatable (0x1)
+// CHECK-I386: NumOfLoadCommands: 4
+// CHECK-I386: SizeOfLoadCommands: 312
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: }
+// CHECK-I386: Sections [
+// CHECK-I386: Section {
+// CHECK-I386: Index: 0
+// CHECK-I386: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK-I386: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK-I386: Address: 0x0
+// CHECK-I386: Size: 0x1
+// CHECK-I386: Offset: 340
+// CHECK-I386: Alignment: 0
+// CHECK-I386: RelocationOffset: 0x0
+// CHECK-I386: RelocationCount: 0
+// CHECK-I386: Type: 0x0
+// CHECK-I386: Attributes [ (0x800004)
+// CHECK-I386: PureInstructions (0x800000)
+// CHECK-I386: SomeInstructions (0x4)
+// CHECK-I386: ]
+// CHECK-I386: Reserved1: 0x0
+// CHECK-I386: Reserved2: 0x0
+// CHECK-I386: SectionData (
+// CHECK-I386: 0000: C3 |.|
+// CHECK-I386: )
+// CHECK-I386: }
+// CHECK-I386: Section {
+// CHECK-I386: Index: 1
+// CHECK-I386: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK-I386: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK-I386: Address: 0x1
+// CHECK-I386: Size: 0x38
+// CHECK-I386: Offset: 341
+// CHECK-I386: Alignment: 0
+// CHECK-I386: RelocationOffset: 0x190
+// CHECK-I386: RelocationCount: 9
+// CHECK-I386: Type: 0x0
+// CHECK-I386: Attributes [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Reserved1: 0x0
+// CHECK-I386: Reserved2: 0x0
+// CHECK-I386: SectionData (
+// CHECK-I386: 0000: 00000000 00000000 05000000 00000000 |................|
+// CHECK-I386: 0010: 05000000 09000000 09000000 00000000 |................|
+// CHECK-I386: 0020: 00000000 00000000 0D000000 0D000000 |................|
+// CHECK-I386: 0030: CFFFFFFF FFFFFFFF |........|
+// CHECK-I386: )
+// CHECK-I386: }
+// CHECK-I386: ]
+// CHECK-I386: Relocations [
+// CHECK-I386: Section __data {
+// CHECK-I386: 0x2C 0 2 0 GENERIC_RELOC_VANILLA 0 __data
+// CHECK-I386: 0x28 0 2 0 GENERIC_RELOC_VANILLA 0 __data
+// CHECK-I386: 0x24 0 2 1 GENERIC_RELOC_VANILLA 0 d3
+// CHECK-I386: 0x20 0 2 1 GENERIC_RELOC_VANILLA 0 d2
+// CHECK-I386: 0x1C 0 2 1 GENERIC_RELOC_VANILLA 0 d
+// CHECK-I386: 0x18 0 2 n/a GENERIC_RELOC_VANILLA 1 0x5
+// CHECK-I386: 0x14 0 2 0 GENERIC_RELOC_VANILLA 0 __data
+// CHECK-I386: 0x10 0 2 0 GENERIC_RELOC_VANILLA 0 __data
+// CHECK-I386: 0x8 0 2 0 GENERIC_RELOC_VANILLA 0 __data
+// CHECK-I386: }
+// CHECK-I386: ]
+// CHECK-I386: Symbols [
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: a (13)
+// CHECK-I386: Type: Section (0xE)
+// CHECK-I386: Section: __data (0x2)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0x5
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: b (11)
+// CHECK-I386: Type: Section (0xE)
+// CHECK-I386: Section: __data (0x2)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0x5
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: c (9)
+// CHECK-I386: Type: Section (0xE)
+// CHECK-I386: Section: __data (0x2)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0x9
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: e (5)
+// CHECK-I386: Type: Section (0xE)
+// CHECK-I386: Section: __data (0x2)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0x9
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: g (1)
+// CHECK-I386: Type: Section (0xE)
+// CHECK-I386: Section: __data (0x2)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0xD
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: f (3)
+// CHECK-I386: Type: Section (0xE)
+// CHECK-I386: Section: __data (0x2)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0xD
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: t0 (21)
+// CHECK-I386: Type: Section (0xE)
+// CHECK-I386: Section: __text (0x1)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0x0
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: d (7)
+// CHECK-I386: Extern
+// CHECK-I386: Type: Undef (0x0)
+// CHECK-I386: Section: (0x0)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0x0
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: d2 (18)
+// CHECK-I386: Extern
+// CHECK-I386: Type: Indirect (0xA)
+// CHECK-I386: Section: (0x0)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0x7
+// CHECK-I386: }
+// CHECK-I386: Symbol {
+// CHECK-I386: Name: d3 (15)
+// CHECK-I386: Extern
+// CHECK-I386: Type: Undef (0x0)
+// CHECK-I386: Section: (0x0)
+// CHECK-I386: RefType: UndefinedNonLazy (0x0)
+// CHECK-I386: Flags [ (0x0)
+// CHECK-I386: ]
+// CHECK-I386: Value: 0x0
+// CHECK-I386: }
+// CHECK-I386: ]
+// CHECK-I386: Indirect Symbols {
+// CHECK-I386: Number: 0
+// CHECK-I386: Symbols [
+// CHECK-I386: ]
+// CHECK-I386: }
+// CHECK-I386: Segment {
+// CHECK-I386: Cmd: LC_SEGMENT
+// CHECK-I386: Name:
+// CHECK-I386: Size: 192
+// CHECK-I386: vmaddr: 0x0
+// CHECK-I386: vmsize: 0x39
+// CHECK-I386: fileoff: 340
+// CHECK-I386: filesize: 57
+// CHECK-I386: maxprot: rwx
+// CHECK-I386: initprot: rwx
+// CHECK-I386: nsects: 2
+// CHECK-I386: flags: 0x0
+// CHECK-I386: }
+// CHECK-I386: Dysymtab {
+// CHECK-I386: ilocalsym: 0
+// CHECK-I386: nlocalsym: 7
+// CHECK-I386: iextdefsym: 7
+// CHECK-I386: nextdefsym: 0
+// CHECK-I386: iundefsym: 7
+// CHECK-I386: nundefsym: 3
+// CHECK-I386: tocoff: 0
+// CHECK-I386: ntoc: 0
+// CHECK-I386: modtaboff: 0
+// CHECK-I386: nmodtab: 0
+// CHECK-I386: extrefsymoff: 0
+// CHECK-I386: nextrefsyms: 0
+// CHECK-I386: indirectsymoff: 0
+// CHECK-I386: nindirectsyms: 0
+// CHECK-I386: extreloff: 0
+// CHECK-I386: nextrel: 0
+// CHECK-I386: locreloff: 0
+// CHECK-I386: nlocrel: 0
+// CHECK-I386: }
+
+// CHECK-X86_64: File: <stdin>
+// CHECK-X86_64: Format: Mach-O 64-bit x86-64
+// CHECK-X86_64: Arch: x86_64
+// CHECK-X86_64: AddressSize: 64bit
+// CHECK-X86_64: MachHeader {
+// CHECK-X86_64: Magic: Magic64 (0xFEEDFACF)
+// CHECK-X86_64: CpuType: X86-64 (0x1000007)
+// CHECK-X86_64: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
+// CHECK-X86_64: FileType: Relocatable (0x1)
+// CHECK-X86_64: NumOfLoadCommands: 4
+// CHECK-X86_64: SizeOfLoadCommands: 352
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Reserved: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Sections [
+// CHECK-X86_64: Section {
+// CHECK-X86_64: Index: 0
+// CHECK-X86_64: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK-X86_64: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK-X86_64: Address: 0x0
+// CHECK-X86_64: Size: 0x1
+// CHECK-X86_64: Offset: 384
+// CHECK-X86_64: Alignment: 0
+// CHECK-X86_64: RelocationOffset: 0x0
+// CHECK-X86_64: RelocationCount: 0
+// CHECK-X86_64: Type: 0x0
+// CHECK-X86_64: Attributes [ (0x800004)
+// CHECK-X86_64: PureInstructions (0x800000)
+// CHECK-X86_64: SomeInstructions (0x4)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Reserved1: 0x0
+// CHECK-X86_64: Reserved2: 0x0
+// CHECK-X86_64: Reserved3: 0x0
+// CHECK-X86_64: SectionData (
+// CHECK-X86_64: 0000: C3 |.|
+// CHECK-X86_64: )
+// CHECK-X86_64: }
+// CHECK-X86_64: Section {
+// CHECK-X86_64: Index: 1
+// CHECK-X86_64: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
+// CHECK-X86_64: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK-X86_64: Address: 0x1
+// CHECK-X86_64: Size: 0x38
+// CHECK-X86_64: Offset: 385
+// CHECK-X86_64: Alignment: 0
+// CHECK-X86_64: RelocationOffset: 0x1BC
+// CHECK-X86_64: RelocationCount: 9
+// CHECK-X86_64: Type: 0x0
+// CHECK-X86_64: Attributes [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Reserved1: 0x0
+// CHECK-X86_64: Reserved2: 0x0
+// CHECK-X86_64: Reserved3: 0x0
+// CHECK-X86_64: SectionData (
+// CHECK-X86_64: 0000: 00000000 00000000 00000000 00000000 |................|
+// CHECK-X86_64: 0010: 00000000 00000000 04000000 00000000 |................|
+// CHECK-X86_64: 0020: 00000000 00000000 00000000 00000000 |................|
+// CHECK-X86_64: 0030: CFFFFFFF FFFFFFFF |........|
+// CHECK-X86_64: )
+// CHECK-X86_64: }
+// CHECK-X86_64: ]
+// CHECK-X86_64: Relocations [
+// CHECK-X86_64: Section __data {
+// CHECK-X86_64: 0x2C 0 2 1 X86_64_RELOC_UNSIGNED 0 g
+// CHECK-X86_64: 0x28 0 2 1 X86_64_RELOC_UNSIGNED 0 f
+// CHECK-X86_64: 0x24 0 2 1 X86_64_RELOC_UNSIGNED 0 d3
+// CHECK-X86_64: 0x20 0 2 1 X86_64_RELOC_UNSIGNED 0 d2
+// CHECK-X86_64: 0x1C 0 2 1 X86_64_RELOC_UNSIGNED 0 d
+// CHECK-X86_64: 0x18 0 2 1 X86_64_RELOC_UNSIGNED 0 a
+// CHECK-X86_64: 0x14 0 2 1 X86_64_RELOC_UNSIGNED 0 e
+// CHECK-X86_64: 0x10 0 2 1 X86_64_RELOC_UNSIGNED 0 b
+// CHECK-X86_64: 0x8 0 2 1 X86_64_RELOC_UNSIGNED 0 b
+// CHECK-X86_64: }
+// CHECK-X86_64: ]
+// CHECK-X86_64: Symbols [
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: a (13)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __data (0x2)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x5
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: b (11)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __data (0x2)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x5
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: c (9)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __data (0x2)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x9
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: e (5)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __data (0x2)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x9
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: g (1)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __data (0x2)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0xD
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: f (3)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __data (0x2)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0xD
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: t0 (21)
+// CHECK-X86_64: Type: Section (0xE)
+// CHECK-X86_64: Section: __text (0x1)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: d (7)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Undef (0x0)
+// CHECK-X86_64: Section: (0x0)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: d2 (18)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Indirect (0xA)
+// CHECK-X86_64: Section: (0x0)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x7
+// CHECK-X86_64: }
+// CHECK-X86_64: Symbol {
+// CHECK-X86_64: Name: d3 (15)
+// CHECK-X86_64: Extern
+// CHECK-X86_64: Type: Undef (0x0)
+// CHECK-X86_64: Section: (0x0)
+// CHECK-X86_64: RefType: UndefinedNonLazy (0x0)
+// CHECK-X86_64: Flags [ (0x0)
+// CHECK-X86_64: ]
+// CHECK-X86_64: Value: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: ]
+// CHECK-X86_64: Indirect Symbols {
+// CHECK-X86_64: Number: 0
+// CHECK-X86_64: Symbols [
+// CHECK-X86_64: ]
+// CHECK-X86_64: }
+// CHECK-X86_64: Segment {
+// CHECK-X86_64: Cmd: LC_SEGMENT_64
+// CHECK-X86_64: Name:
+// CHECK-X86_64: Size: 232
+// CHECK-X86_64: vmaddr: 0x0
+// CHECK-X86_64: vmsize: 0x39
+// CHECK-X86_64: fileoff: 384
+// CHECK-X86_64: filesize: 57
+// CHECK-X86_64: maxprot: rwx
+// CHECK-X86_64: initprot: rwx
+// CHECK-X86_64: nsects: 2
+// CHECK-X86_64: flags: 0x0
+// CHECK-X86_64: }
+// CHECK-X86_64: Dysymtab {
+// CHECK-X86_64: ilocalsym: 0
+// CHECK-X86_64: nlocalsym: 7
+// CHECK-X86_64: iextdefsym: 7
+// CHECK-X86_64: nextdefsym: 0
+// CHECK-X86_64: iundefsym: 7
+// CHECK-X86_64: nundefsym: 3
+// CHECK-X86_64: tocoff: 0
+// CHECK-X86_64: ntoc: 0
+// CHECK-X86_64: modtaboff: 0
+// CHECK-X86_64: nmodtab: 0
+// CHECK-X86_64: extrefsymoff: 0
+// CHECK-X86_64: nextrefsyms: 0
+// CHECK-X86_64: indirectsymoff: 0
+// CHECK-X86_64: nindirectsyms: 0
+// CHECK-X86_64: extreloff: 0
+// CHECK-X86_64: nextrel: 0
+// CHECK-X86_64: locreloff: 0
+// CHECK-X86_64: nlocrel: 0
+// CHECK-X86_64: }
Modified: llvm/trunk/test/MC/MachO/weakdef.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/weakdef.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/weakdef.s (original)
+++ llvm/trunk/test/MC/MachO/weakdef.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
.section __DATA,__datacoal_nt,coalesced
.section __TEXT,__const_coal,coalesced
@@ -14,128 +14,142 @@ __ZTS3optIbE:
__ZTI3optIbE:
.long __ZTS3optIbE
-// CHECK: ('cputype', 7)
-// CHECK-NEXT: ('cpusubtype', 3)
-// CHECK-NEXT: ('filetype', 1)
-// CHECK-NEXT: ('num_load_commands', 4)
-// CHECK-NEXT: ('load_commands_size', 380)
-// CHECK-NEXT: ('flag', 0)
-// CHECK-NEXT: ('load_commands', [
-// CHECK-NEXT: # Load Command 0
-// CHECK-NEXT: (('command', 1)
-// CHECK-NEXT: ('size', 260)
-// CHECK-NEXT: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('vm_addr', 0)
-// CHECK-NEXT: ('vm_size', 4)
-// CHECK-NEXT: ('file_offset', 408)
-// CHECK-NEXT: ('file_size', 4)
-// CHECK-NEXT: ('maxprot', 7)
-// CHECK-NEXT: ('initprot', 7)
-// CHECK-NEXT: ('num_sections', 3)
-// CHECK-NEXT: ('flags', 0)
-// CHECK-NEXT: ('sections', [
-// CHECK-NEXT: # Section 0
-// CHECK-NEXT: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 0)
-// CHECK-NEXT: ('size', 0)
-// CHECK-NEXT: ('offset', 408)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 0)
-// CHECK-NEXT: ('num_reloc', 0)
-// CHECK-NEXT: ('flags', 0x80000000)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', '')
-// CHECK-NEXT: # Section 1
-// CHECK-NEXT: (('section_name', '__datacoal_nt\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 0)
-// CHECK-NEXT: ('size', 4)
-// CHECK-NEXT: ('offset', 408)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 412)
-// CHECK-NEXT: ('num_reloc', 1)
-// CHECK-NEXT: ('flags', 0xb)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('word-0', 0x0),
-// CHECK-NEXT: ('word-1', 0xc000001)),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', '00000000')
-// CHECK-NEXT: # Section 2
-// CHECK-NEXT: (('section_name', '__const_coal\x00\x00\x00\x00')
-// CHECK-NEXT: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT: ('address', 4)
-// CHECK-NEXT: ('size', 0)
-// CHECK-NEXT: ('offset', 412)
-// CHECK-NEXT: ('alignment', 0)
-// CHECK-NEXT: ('reloc_offset', 0)
-// CHECK-NEXT: ('num_reloc', 0)
-// CHECK-NEXT: ('flags', 0xb)
-// CHECK-NEXT: ('reserved1', 0)
-// CHECK-NEXT: ('reserved2', 0)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ('_section_data', '')
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK: # Load Command 2
-// CHECK-NEXT: (('command', 2)
-// CHECK-NEXT: ('size', 24)
-// CHECK-NEXT: ('symoff', 420)
-// CHECK-NEXT: ('nsyms', 2)
-// CHECK-NEXT: ('stroff', 444)
-// CHECK-NEXT: ('strsize', 28)
-// CHECK-NEXT: ('_string_data', '\x00__ZTS3optIbE\x00__ZTI3optIbE\x00\x00')
-// CHECK-NEXT: ('_symbols', [
-// CHECK-NEXT: # Symbol 0
-// CHECK-NEXT: (('n_strx', 14)
-// CHECK-NEXT: ('n_type', 0xf)
-// CHECK-NEXT: ('n_sect', 2)
-// CHECK-NEXT: ('n_desc', 128)
-// CHECK-NEXT: ('n_value', 0)
-// CHECK-NEXT: ('_string', '__ZTI3optIbE')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 1
-// CHECK-NEXT: (('n_strx', 1)
-// CHECK-NEXT: ('n_type', 0xf)
-// CHECK-NEXT: ('n_sect', 3)
-// CHECK-NEXT: ('n_desc', 128)
-// CHECK-NEXT: ('n_value', 4)
-// CHECK-NEXT: ('_string', '__ZTS3optIbE')
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Load Command 3
-// CHECK-NEXT: (('command', 11)
-// CHECK-NEXT: ('size', 80)
-// CHECK-NEXT: ('ilocalsym', 0)
-// CHECK-NEXT: ('nlocalsym', 0)
-// CHECK-NEXT: ('iextdefsym', 0)
-// CHECK-NEXT: ('nextdefsym', 2)
-// CHECK-NEXT: ('iundefsym', 2)
-// CHECK-NEXT: ('nundefsym', 0)
-// CHECK-NEXT: ('tocoff', 0)
-// CHECK-NEXT: ('ntoc', 0)
-// CHECK-NEXT: ('modtaboff', 0)
-// CHECK-NEXT: ('nmodtab', 0)
-// CHECK-NEXT: ('extrefsymoff', 0)
-// CHECK-NEXT: ('nextrefsyms', 0)
-// CHECK-NEXT: ('indirectsymoff', 0)
-// CHECK-NEXT: ('nindirectsyms', 0)
-// CHECK-NEXT: ('extreloff', 0)
-// CHECK-NEXT: ('nextrel', 0)
-// CHECK-NEXT: ('locreloff', 0)
-// CHECK-NEXT: ('nlocrel', 0)
-// CHECK-NEXT: ('_indirect_symbols', [
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: File: <stdin>
+// CHECK-NEXT: Format: Mach-O 32-bit i386
+// CHECK-NEXT: Arch: i386
+// CHECK-NEXT: AddressSize: 32bit
+// CHECK-NEXT: MachHeader {
+// CHECK-NEXT: Magic: Magic (0xFEEDFACE)
+// CHECK-NEXT: CpuType: X86 (0x7)
+// CHECK-NEXT: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK-NEXT: FileType: Relocatable (0x1)
+// CHECK-NEXT: NumOfLoadCommands: 4
+// CHECK-NEXT: SizeOfLoadCommands: 380
+// CHECK-NEXT: Flags [ (0x0)
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: Sections [
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 0
+// CHECK-NEXT: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Size: 0x0
+// CHECK-NEXT: Offset: 408
+// CHECK-NEXT: Alignment: 0
+// CHECK-NEXT: RelocationOffset: 0x0
+// CHECK-NEXT: RelocationCount: 0
+// CHECK-NEXT: Type: 0x0
+// CHECK-NEXT: Attributes [ (0x800000)
+// CHECK-NEXT: PureInstructions (0x800000)
+// CHECK-NEXT: ]
+// CHECK-NEXT: Reserved1: 0x0
+// CHECK-NEXT: Reserved2: 0x0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 1
+// CHECK-NEXT: Name: __datacoal_nt (5F 5F 64 61 74 61 63 6F 61 6C 5F 6E 74 00 00 00)
+// CHECK-NEXT: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Size: 0x4
+// CHECK-NEXT: Offset: 408
+// CHECK-NEXT: Alignment: 0
+// CHECK-NEXT: RelocationOffset: 0x19C
+// CHECK-NEXT: RelocationCount: 1
+// CHECK-NEXT: Type: 0xB
+// CHECK-NEXT: Attributes [ (0x0)
+// CHECK-NEXT: ]
+// CHECK-NEXT: Reserved1: 0x0
+// CHECK-NEXT: Reserved2: 0x0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 00000000 |....|
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 2
+// CHECK-NEXT: Name: __const_coal (5F 5F 63 6F 6E 73 74 5F 63 6F 61 6C 00 00 00 00)
+// CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK-NEXT: Address: 0x4
+// CHECK-NEXT: Size: 0x0
+// CHECK-NEXT: Offset: 412
+// CHECK-NEXT: Alignment: 0
+// CHECK-NEXT: RelocationOffset: 0x0
+// CHECK-NEXT: RelocationCount: 0
+// CHECK-NEXT: Type: 0xB
+// CHECK-NEXT: Attributes [ (0x0)
+// CHECK-NEXT: ]
+// CHECK-NEXT: Reserved1: 0x0
+// CHECK-NEXT: Reserved2: 0x0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: Section __datacoal_nt {
+// CHECK-NEXT: 0x0 0 2 1 GENERIC_RELOC_VANILLA 0 __ZTS3optIbE
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: Symbols [
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: __ZTI3optIbE (14)
+// CHECK-NEXT: Extern
+// CHECK-NEXT: Type: Section (0xE)
+// CHECK-NEXT: Section: __datacoal_nt (0x2)
+// CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
+// CHECK-NEXT: Flags [ (0x80)
+// CHECK-NEXT: WeakDef (0x80)
+// CHECK-NEXT: ]
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: __ZTS3optIbE (1)
+// CHECK-NEXT: Extern
+// CHECK-NEXT: Type: Section (0xE)
+// CHECK-NEXT: Section: __const_coal (0x3)
+// CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
+// CHECK-NEXT: Flags [ (0x80)
+// CHECK-NEXT: WeakDef (0x80)
+// CHECK-NEXT: ]
+// CHECK-NEXT: Value: 0x4
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+// CHECK-NEXT: Indirect Symbols {
+// CHECK-NEXT: Number: 0
+// CHECK-NEXT: Symbols [
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: Segment {
+// CHECK-NEXT: Cmd: LC_SEGMENT
+// CHECK-NEXT: Name:
+// CHECK-NEXT: Size: 260
+// CHECK-NEXT: vmaddr: 0x0
+// CHECK-NEXT: vmsize: 0x4
+// CHECK-NEXT: fileoff: 408
+// CHECK-NEXT: filesize: 4
+// CHECK-NEXT: maxprot: rwx
+// CHECK-NEXT: initprot: rwx
+// CHECK-NEXT: nsects: 3
+// CHECK-NEXT: flags: 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: Dysymtab {
+// CHECK-NEXT: ilocalsym: 0
+// CHECK-NEXT: nlocalsym: 0
+// CHECK-NEXT: iextdefsym: 0
+// CHECK-NEXT: nextdefsym: 2
+// CHECK-NEXT: iundefsym: 2
+// CHECK-NEXT: nundefsym: 0
+// CHECK-NEXT: tocoff: 0
+// CHECK-NEXT: ntoc: 0
+// CHECK-NEXT: modtaboff: 0
+// CHECK-NEXT: nmodtab: 0
+// CHECK-NEXT: extrefsymoff: 0
+// CHECK-NEXT: nextrefsyms: 0
+// CHECK-NEXT: indirectsymoff: 0
+// CHECK-NEXT: nindirectsyms: 0
+// CHECK-NEXT: extreloff: 0
+// CHECK-NEXT: nextrel: 0
+// CHECK-NEXT: locreloff: 0
+// CHECK-NEXT: nlocrel: 0
+// CHECK-NEXT: }
Modified: llvm/trunk/test/MC/MachO/x86-data-in-code.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/x86-data-in-code.ll?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/x86-data-in-code.ll (original)
+++ llvm/trunk/test/MC/MachO/x86-data-in-code.ll Wed Sep 9 20:50:00 2015
@@ -1,9 +1,8 @@
-; RUN: llc -O0 -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | macho-dump | FileCheck %s
+; RUN: llc -O0 -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | llvm-readobj -macho-data-in-code | FileCheck %s
; There should not be a data-in-code load command (type 0x29) for x86_64
; jump tables, even though they are in the text section.
-; CHECK: 'num_load_commands'
-; CHECK-NOT: (('command', 41)
+; CHECK-NOT: DataInCode {
define void @foo(i32* %ptr) nounwind ssp {
%tmp = load i32, i32* %ptr, align 4
Modified: llvm/trunk/test/MC/MachO/x86_32-optimal_nop.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/x86_32-optimal_nop.s?rev=247235&r1=247234&r2=247235&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/x86_32-optimal_nop.s (original)
+++ llvm/trunk/test/MC/MachO/x86_32-optimal_nop.s Wed Sep 9 20:50:00 2015
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
# 1 byte nop test
.align 4, 0 # start with 16 byte alignment filled with zeros
@@ -157,101 +157,132 @@ f0:
.align 4, 0x90
.long 0
-// CHECK: ('cputype', 7)
-// CHECK: ('cpusubtype', 3)
-// CHECK: ('filetype', 1)
-// CHECK: ('num_load_commands', 4)
-// CHECK: ('load_commands_size', 312)
-// CHECK: ('flag', 0)
-// CHECK: ('load_commands', [
-// CHECK: # Load Command 0
-// CHECK: (('command', 1)
-// CHECK: ('size', 192)
-// 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', 372)
-// CHECK: ('file_offset', 340)
-// CHECK: ('file_size', 372)
-// 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', 337)
-// CHECK: ('offset', 340)
-// CHECK: ('alignment', 4)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x80000400)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', 'c390c300 00000000 00000000 00000000 c3c36690 c3000000 00000000 00000000 c30f1f00 c3000000 00000000 00000000 c3c3c3c3 0f1f4000 c3000000 00000000 c3c3c30f 1f440000 c3000000 00000000 c3c3660f 1f440000 c3000000 00000000 c30f1f80 00000000 c3000000 00000000 c3c3c3c3 c3c3c3c3 c3000000 00000000 c3c3c3c3 c3c3c366 0f1f8400 00000000 c3000000 00000000 00000000 00000000 c3c3c3c3 c3c3c366 0f1f8400 00000000 c3000000 00000000 00000000 00000000 c3c3c3c3 c366662e 0f1f8400 00000000 c3000000 00000000 00000000 00000000 c3c3c3c3 6666662e 0f1f8400 00000000 c3000000 00000000 00000000 00000000 c3c3c366 6666662e 0f1f8400 00000000 c3000000 00000000 00000000 00000000 c3c36666 6666662e 0f1f8400 00000000 c3000000 00000000 00000000 00000000 c3666666 6666662e 0f1f8400 00000000 c3')
-// CHECK: # Section 1
-// CHECK: (('section_name', '__const\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', 352)
-// CHECK: ('size', 20)
-// CHECK: ('offset', 692)
-// CHECK: ('alignment', 4)
-// CHECK: ('reloc_offset', 0)
-// CHECK: ('num_reloc', 0)
-// CHECK: ('flags', 0x0)
-// CHECK: ('reserved1', 0)
-// CHECK: ('reserved2', 0)
-// CHECK: ),
-// CHECK: ('_relocations', [
-// CHECK: ])
-// CHECK: ('_section_data', '00909090 90909090 90909090 90909090 00000000')
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 2
-// CHECK: (('command', 2)
-// CHECK: ('size', 24)
-// CHECK: ('symoff', 712)
-// CHECK: ('nsyms', 1)
-// CHECK: ('stroff', 724)
-// CHECK: ('strsize', 4)
-// CHECK: ('_string_data', '\x00f0\x00')
-// CHECK: ('_symbols', [
-// CHECK: # Symbol 0
-// CHECK: (('n_strx', 1)
-// CHECK: ('n_type', 0xe)
-// CHECK: ('n_sect', 2)
-// CHECK: ('n_desc', 0)
-// CHECK: ('n_value', 352)
-// CHECK: ('_string', 'f0')
-// CHECK: ),
-// CHECK: ])
-// CHECK: ),
-// CHECK: # Load Command 3
-// CHECK: (('command', 11)
-// CHECK: ('size', 80)
-// CHECK: ('ilocalsym', 0)
-// CHECK: ('nlocalsym', 1)
-// CHECK: ('iextdefsym', 1)
-// CHECK: ('nextdefsym', 0)
-// CHECK: ('iundefsym', 1)
-// CHECK: ('nundefsym', 0)
-// CHECK: ('tocoff', 0)
-// CHECK: ('ntoc', 0)
-// CHECK: ('modtaboff', 0)
-// CHECK: ('nmodtab', 0)
-// CHECK: ('extrefsymoff', 0)
-// CHECK: ('nextrefsyms', 0)
-// CHECK: ('indirectsymoff', 0)
-// CHECK: ('nindirectsyms', 0)
-// CHECK: ('extreloff', 0)
-// CHECK: ('nextrel', 0)
-// CHECK: ('locreloff', 0)
-// CHECK: ('nlocrel', 0)
-// CHECK: ('_indirect_symbols', [
-// CHECK: ])
-// CHECK: ),
-// CHECK: ])
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 32-bit i386
+// CHECK: Arch: i386
+// CHECK: AddressSize: 32bit
+// CHECK: MachHeader {
+// CHECK: Magic: Magic (0xFEEDFACE)
+// CHECK: CpuType: X86 (0x7)
+// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
+// CHECK: FileType: Relocatable (0x1)
+// CHECK: NumOfLoadCommands: 4
+// CHECK: SizeOfLoadCommands: 312
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x0
+// CHECK: Size: 0x151
+// CHECK: Offset: 340
+// CHECK: Alignment: 4
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x800004)
+// CHECK: PureInstructions (0x800000)
+// CHECK: SomeInstructions (0x4)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: C390C300 00000000 00000000 00000000 |................|
+// CHECK: 0010: C3C36690 C3000000 00000000 00000000 |..f.............|
+// CHECK: 0020: C30F1F00 C3000000 00000000 00000000 |................|
+// CHECK: 0030: C3C3C3C3 0F1F4000 C3000000 00000000 |...... at .........|
+// CHECK: 0040: C3C3C30F 1F440000 C3000000 00000000 |.....D..........|
+// CHECK: 0050: C3C3660F 1F440000 C3000000 00000000 |..f..D..........|
+// CHECK: 0060: C30F1F80 00000000 C3000000 00000000 |................|
+// CHECK: 0070: C3C3C3C3 C3C3C3C3 C3000000 00000000 |................|
+// CHECK: 0080: C3C3C3C3 C3C3C366 0F1F8400 00000000 |.......f........|
+// CHECK: 0090: C3000000 00000000 00000000 00000000 |................|
+// CHECK: 00A0: C3C3C3C3 C3C3C366 0F1F8400 00000000 |.......f........|
+// CHECK: 00B0: C3000000 00000000 00000000 00000000 |................|
+// CHECK: 00C0: C3C3C3C3 C366662E 0F1F8400 00000000 |.....ff.........|
+// CHECK: 00D0: C3000000 00000000 00000000 00000000 |................|
+// CHECK: 00E0: C3C3C3C3 6666662E 0F1F8400 00000000 |....fff.........|
+// CHECK: 00F0: C3000000 00000000 00000000 00000000 |................|
+// CHECK: 0100: C3C3C366 6666662E 0F1F8400 00000000 |...ffff.........|
+// CHECK: 0110: C3000000 00000000 00000000 00000000 |................|
+// CHECK: 0120: C3C36666 6666662E 0F1F8400 00000000 |..fffff.........|
+// CHECK: 0130: C3000000 00000000 00000000 00000000 |................|
+// CHECK: 0140: C3666666 6666662E 0F1F8400 00000000 |.ffffff.........|
+// CHECK: 0150: C3 |.|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK: Name: __const (5F 5F 63 6F 6E 73 74 00 00 00 00 00 00 00 00 00)
+// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
+// CHECK: Address: 0x160
+// CHECK: Size: 0x14
+// CHECK: Offset: 692
+// CHECK: Alignment: 4
+// CHECK: RelocationOffset: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: Type: 0x0
+// CHECK: Attributes [ (0x0)
+// CHECK: ]
+// CHECK: Reserved1: 0x0
+// CHECK: Reserved2: 0x0
+// CHECK: SectionData (
+// CHECK: 0000: 00909090 90909090 90909090 90909090 |................|
+// CHECK: 0010: 00000000 |....|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: f0 (1)
+// CHECK: Type: Section (0xE)
+// CHECK: Section: __const (0x2)
+// CHECK: RefType: UndefinedNonLazy (0x0)
+// CHECK: Flags [ (0x0)
+// CHECK: ]
+// CHECK: Value: 0x160
+// CHECK: }
+// CHECK: ]
+// CHECK: Indirect Symbols {
+// CHECK: Number: 0
+// CHECK: Symbols [
+// CHECK: ]
+// CHECK: }
+// CHECK: Segment {
+// CHECK: Cmd: LC_SEGMENT
+// CHECK: Name:
+// CHECK: Size: 192
+// CHECK: vmaddr: 0x0
+// CHECK: vmsize: 0x174
+// CHECK: fileoff: 340
+// CHECK: filesize: 372
+// CHECK: maxprot: rwx
+// CHECK: initprot: rwx
+// CHECK: nsects: 2
+// CHECK: flags: 0x0
+// CHECK: }
+// CHECK: Dysymtab {
+// CHECK: ilocalsym: 0
+// CHECK: nlocalsym: 1
+// CHECK: iextdefsym: 1
+// CHECK: nextdefsym: 0
+// CHECK: iundefsym: 1
+// CHECK: nundefsym: 0
+// CHECK: tocoff: 0
+// CHECK: ntoc: 0
+// CHECK: modtaboff: 0
+// CHECK: nmodtab: 0
+// CHECK: extrefsymoff: 0
+// CHECK: nextrefsyms: 0
+// CHECK: indirectsymoff: 0
+// CHECK: nindirectsyms: 0
+// CHECK: extreloff: 0
+// CHECK: nextrel: 0
+// CHECK: locreloff: 0
+// CHECK: nlocrel: 0
+// CHECK: }
More information about the llvm-commits
mailing list