[MC] Convert all the remaining tests from macho-dump to llvm-readobj.
[oota-llvm.git] / test / MC / MachO / variable-exprs.s
index ff0e727974f534f3766169de7bc7b5f56fc1f8fd..85f395fd3be8a2cc7d7ae37882a1e82652e9dac3 100644 (file)
@@ -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-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: ('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-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: }