1 // 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
20 // CHECK: File: <stdin>
21 // CHECK: Format: Mach-O 32-bit i386
23 // CHECK: AddressSize: 32bit
24 // CHECK: MachHeader {
25 // CHECK: Magic: Magic (0xFEEDFACE)
26 // CHECK: CpuType: X86 (0x7)
27 // CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
28 // CHECK: FileType: Relocatable (0x1)
29 // CHECK: NumOfLoadCommands: 4
30 // CHECK: SizeOfLoadCommands: 312
31 // CHECK: Flags [ (0x0)
37 // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
38 // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
39 // CHECK: Address: 0x0
42 // CHECK: Alignment: 0
43 // CHECK: RelocationOffset: 0x0
44 // CHECK: RelocationCount: 0
46 // CHECK: Attributes [ (0x800000)
47 // CHECK: PureInstructions (0x800000)
49 // CHECK: Reserved1: 0x0
50 // CHECK: Reserved2: 0x0
54 // CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
55 // CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
56 // CHECK: Address: 0xC
59 // CHECK: Alignment: 0
60 // CHECK: RelocationOffset: 0x0
61 // CHECK: RelocationCount: 0
63 // CHECK: Attributes [ (0x0)
65 // CHECK: Reserved1: 0x0
66 // CHECK: Reserved2: 0x0
69 // CHECK: Relocations [
73 // CHECK: Name: text_def_int (27)
74 // CHECK: Type: Section (0xE)
75 // CHECK: Section: __text (0x1)
76 // CHECK: RefType: UndefinedNonLazy (0x0)
77 // CHECK: Flags [ (0x0)
82 // CHECK: Name: data_def_int (40)
83 // CHECK: Type: Section (0xE)
84 // CHECK: Section: __data (0x2)
85 // CHECK: RefType: UndefinedNonLazy (0x0)
86 // CHECK: Flags [ (0x0)
91 // CHECK: Name: data_def_ext (14)
93 // CHECK: Type: Section (0xE)
94 // CHECK: Section: __data (0x2)
95 // CHECK: RefType: UndefinedNonLazy (0x0)
96 // CHECK: Flags [ (0x0)
101 // CHECK: Name: text_def_ext (1)
103 // CHECK: Type: Section (0xE)
104 // CHECK: Section: __text (0x1)
105 // CHECK: RefType: UndefinedNonLazy (0x0)
106 // CHECK: Flags [ (0x0)
111 // CHECK: Indirect Symbols {
117 // CHECK: Cmd: LC_SEGMENT
120 // CHECK: vmaddr: 0x0
121 // CHECK: vmsize: 0x18
122 // CHECK: fileoff: 340
123 // CHECK: filesize: 24
124 // CHECK: maxprot: rwx
125 // CHECK: initprot: rwx
130 // CHECK: ilocalsym: 0
131 // CHECK: nlocalsym: 2
132 // CHECK: iextdefsym: 2
133 // CHECK: nextdefsym: 2
134 // CHECK: iundefsym: 4
135 // CHECK: nundefsym: 0
138 // CHECK: modtaboff: 0
140 // CHECK: extrefsymoff: 0
141 // CHECK: nextrefsyms: 0
142 // CHECK: indirectsymoff: 0
143 // CHECK: nindirectsyms: 0
144 // CHECK: extreloff: 0
146 // CHECK: locreloff: 0