1 # RUN: yaml2obj %s --docnum=1 -o %t.i386
2 # RUN: llvm-readobj -h %t.i386 \
3 # RUN: | FileCheck %s --strict-whitespace --match-full-lines -DFILE=%t.i386 --check-prefix I386
6 # I386-NEXT:Format: Mach-O 32-bit i386
8 # I386-NEXT:AddressSize: 32bit
9 # I386-NEXT:MachHeader {
10 # I386-NEXT: Magic: Magic (0xFEEDFACE)
11 # I386-NEXT: CpuType: X86 (0x7)
12 # I386-NEXT: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
13 # I386-NEXT: FileType: Relocatable (0x1)
14 # I386-NEXT: NumOfLoadCommands: 0
15 # I386-NEXT: SizeOfLoadCommands: 0
16 # I386-NEXT: Flags [ (0x2000)
17 # I386-NEXT: MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
26 cpusubtype: 0x00000003
32 # RUN: yaml2obj %s --docnum=2 -o %t.x86-64
33 # RUN: llvm-readobj -h %t.x86-64 \
34 # RUN: | FileCheck %s --strict-whitespace --match-full-lines -DFILE=%t.x86-64 --check-prefix X86-64
36 # X86-64:File: [[FILE]]
37 # X86-64-NEXT:Format: Mach-O 64-bit x86-64
38 # X86-64-NEXT:Arch: x86_64
39 # X86-64-NEXT:AddressSize: 64bit
40 # X86-64-NEXT:MachHeader {
41 # X86-64-NEXT: Magic: Magic64 (0xFEEDFACF)
42 # X86-64-NEXT: CpuType: X86-64 (0x1000007)
43 # X86-64-NEXT: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
44 # X86-64-NEXT: FileType: Relocatable (0x1)
45 # X86-64-NEXT: NumOfLoadCommands: 0
46 # X86-64-NEXT: SizeOfLoadCommands: 0
47 # X86-64-NEXT: Flags [ (0x2000)
48 # X86-64-NEXT: MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
50 # X86-64-NEXT: Reserved: 0x0
58 cpusubtype: 0x00000003
65 # RUN: yaml2obj %s --docnum=3 -o %t.ppc
66 # RUN: llvm-readobj -h %t.ppc \
67 # RUN: | FileCheck %s --strict-whitespace --match-full-lines -DFILE=%t.ppc --check-prefix PPC
70 # PPC-NEXT:Format: Mach-O 32-bit ppc
71 # PPC-NEXT:Arch: powerpc
72 # PPC-NEXT:AddressSize: 32bit
73 # PPC-NEXT:MachHeader {
74 # PPC-NEXT: Magic: Magic (0xFEEDFACE)
75 # PPC-NEXT: CpuType: PowerPC (0x12)
76 # PPC-NEXT: CpuSubType: CPU_SUBTYPE_POWERPC_ALL (0x0)
77 # PPC-NEXT: FileType: Relocatable (0x1)
78 # PPC-NEXT: NumOfLoadCommands: 0
79 # PPC-NEXT: SizeOfLoadCommands: 0
80 # PPC-NEXT: Flags [ (0x2000)
81 # PPC-NEXT: MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
91 cpusubtype: 0x00000000
97 # RUN: yaml2obj %s --docnum=4 -o %t.ppc64
98 # RUN: llvm-readobj -h %t.ppc64 \
99 # RUN: | FileCheck %s --strict-whitespace --match-full-lines -DFILE=%t.ppc64 --check-prefix PPC64
101 # PPC64:File: [[FILE]]
102 # PPC64-NEXT:Format: Mach-O 64-bit ppc64
103 # PPC64-NEXT:Arch: powerpc64
104 # PPC64-NEXT:AddressSize: 64bit
105 # PPC64-NEXT:MachHeader {
106 # PPC64-NEXT: Magic: Magic64 (0xFEEDFACF)
107 # PPC64-NEXT: CpuType: PowerPC64 (0x1000012)
108 # PPC64-NEXT: CpuSubtype: 0x0
109 # PPC64-NEXT: FileType: Relocatable (0x1)
110 # PPC64-NEXT: NumOfLoadCommands: 0
111 # PPC64-NEXT: SizeOfLoadCommands: 0
112 # PPC64-NEXT: Flags [ (0x2000)
113 # PPC64-NEXT: MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
115 # PPC64-NEXT: Reserved: 0x0
120 IsLittleEndian: false
124 cpusubtype: 0x00000000
131 # RUN: yaml2obj %s --docnum=5 -o %t.arm
132 # RUN: llvm-readobj -h %t.arm \
133 # RUN: | FileCheck %s --strict-whitespace --match-full-lines -DFILE=%t.arm --check-prefix ARM
136 # ARM-NEXT:Format: Mach-O arm
138 # ARM-NEXT:AddressSize: 32bit
139 # ARM-NEXT:MachHeader {
140 # ARM-NEXT: Magic: Magic (0xFEEDFACE)
141 # ARM-NEXT: CpuType: Arm (0xC)
142 # ARM-NEXT: CpuSubType: CPU_SUBTYPE_ARM_V7 (0x9)
143 # ARM-NEXT: FileType: Relocatable (0x1)
144 # ARM-NEXT: NumOfLoadCommands: 0
145 # ARM-NEXT: SizeOfLoadCommands: 0
146 # ARM-NEXT: Flags [ (0x2000)
147 # ARM-NEXT: MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
156 cpusubtype: 0x00000009