1 // 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 2 _g: 3 LFB2: 4 .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support 5 _g.eh: 6 .quad LFB2-. 7 8 // CHECK: File: <stdin> 9 // CHECK: Format: Mach-O 64-bit x86-64 10 // CHECK: Arch: x86_64 11 // CHECK: AddressSize: 64bit 12 // CHECK: MachHeader { 13 // CHECK: Magic: Magic64 (0xFEEDFACF) 14 // CHECK: CpuType: X86-64 (0x1000007) 15 // CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3) 16 // CHECK: FileType: Relocatable (0x1) 17 // CHECK: NumOfLoadCommands: 4 18 // CHECK: SizeOfLoadCommands: 352 19 // CHECK: Flags [ (0x0) 20 // CHECK: ] 21 // CHECK: Reserved: 0x0 22 // CHECK: } 23 // CHECK: Sections [ 24 // CHECK: Section { 25 // CHECK: Index: 0 26 // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00) 27 // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00) 28 // CHECK: Address: 0x0 29 // CHECK: Size: 0x0 30 // CHECK: Offset: 384 31 // CHECK: Alignment: 0 32 // CHECK: RelocationOffset: 0x0 33 // CHECK: RelocationCount: 0 34 // CHECK: Type: 0x0 35 // CHECK: Attributes [ (0x800000) 36 // CHECK: PureInstructions (0x800000) 37 // CHECK: ] 38 // CHECK: Reserved1: 0x0 39 // CHECK: Reserved2: 0x0 40 // CHECK: Reserved3: 0x0 41 // CHECK: SectionData ( 42 // CHECK: ) 43 // CHECK: } 44 // CHECK: Section { 45 // CHECK: Index: 1 46 // CHECK: Name: __eh_frame (5F 5F 65 68 5F 66 72 61 6D 65 00 00 00 00 00 00) 47 // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00) 48 // CHECK: Address: 0x0 49 // CHECK: Size: 0x8 50 // CHECK: Offset: 384 51 // CHECK: Alignment: 0 52 // CHECK: RelocationOffset: 0x188 53 // CHECK: RelocationCount: 2 54 // CHECK: Type: 0xB 55 // CHECK: Attributes [ (0x680000) 56 // CHECK: LiveSupport (0x80000) 57 // CHECK: NoTOC (0x400000) 58 // CHECK: StripStaticSyms (0x200000) 59 // CHECK: ] 60 // CHECK: Reserved1: 0x0 61 // CHECK: Reserved2: 0x0 62 // CHECK: Reserved3: 0x0 63 // CHECK: SectionData ( 64 // CHECK: 0000: 00000000 00000000 |........| 65 // CHECK: ) 66 // CHECK: } 67 // CHECK: ] 68 // CHECK: Relocations [ 69 // CHECK: Section __eh_frame { 70 // CHECK: 0x0 0 3 1 X86_64_RELOC_SUBTRACTOR 0 _g.eh 71 // CHECK: 0x0 0 3 1 X86_64_RELOC_UNSIGNED 0 _g 72 // CHECK: } 73 // CHECK: ] 74 // CHECK: Symbols [ 75 // CHECK: Symbol { 76 // CHECK: Name: _g (7) 77 // CHECK: Type: Section (0xE) 78 // CHECK: Section: __text (0x1) 79 // CHECK: RefType: UndefinedNonLazy (0x0) 80 // CHECK: Flags [ (0x0) 81 // CHECK: ] 82 // CHECK: Value: 0x0 83 // CHECK: } 84 // CHECK: Symbol { 85 // CHECK: Name: _g.eh (1) 86 // CHECK: Type: Section (0xE) 87 // CHECK: Section: __eh_frame (0x2) 88 // CHECK: RefType: UndefinedNonLazy (0x0) 89 // CHECK: Flags [ (0x0) 90 // CHECK: ] 91 // CHECK: Value: 0x0 92 // CHECK: } 93 // CHECK: ] 94 // CHECK: Indirect Symbols { 95 // CHECK: Number: 0 96 // CHECK: Symbols [ 97 // CHECK: ] 98 // CHECK: } 99 // CHECK: Segment { 100 // CHECK: Cmd: LC_SEGMENT_64 101 // CHECK: Name: 102 // CHECK: Size: 232 103 // CHECK: vmaddr: 0x0 104 // CHECK: vmsize: 0x8 105 // CHECK: fileoff: 384 106 // CHECK: filesize: 8 107 // CHECK: maxprot: rwx 108 // CHECK: initprot: rwx 109 // CHECK: nsects: 2 110 // CHECK: flags: 0x0 111 // CHECK: } 112 // CHECK: Dysymtab { 113 // CHECK: ilocalsym: 0 114 // CHECK: nlocalsym: 2 115 // CHECK: iextdefsym: 2 116 // CHECK: nextdefsym: 0 117 // CHECK: iundefsym: 2 118 // CHECK: nundefsym: 0 119 // CHECK: tocoff: 0 120 // CHECK: ntoc: 0 121 // CHECK: modtaboff: 0 122 // CHECK: nmodtab: 0 123 // CHECK: extrefsymoff: 0 124 // CHECK: nextrefsyms: 0 125 // CHECK: indirectsymoff: 0 126 // CHECK: nindirectsyms: 0 127 // CHECK: extreloff: 0 128 // CHECK: nextrel: 0 129 // CHECK: locreloff: 0 130 // CHECK: nlocrel: 0 131 // CHECK: } 132