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 4 5# I386:File: [[FILE]] 6# I386-NEXT:Format: Mach-O 32-bit i386 7# I386-NEXT:Arch: 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) 18# I386-NEXT: ] 19# I386-NEXT:} 20# I386-NOT:{{.}} 21 22--- !mach-o 23FileHeader: 24 magic: 0xFEEDFACE 25 cputype: 0x00000007 26 cpusubtype: 0x00000003 27 filetype: 0x00000001 28 ncmds: 0 29 sizeofcmds: 0 30 flags: 0x00002000 31 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 35 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) 49# X86-64-NEXT: ] 50# X86-64-NEXT: Reserved: 0x0 51# X86-64-NEXT:} 52# X86-64-NOT:{{.}} 53 54--- !mach-o 55FileHeader: 56 magic: 0xFEEDFACF 57 cputype: 0x01000007 58 cpusubtype: 0x00000003 59 filetype: 0x00000001 60 ncmds: 0 61 sizeofcmds: 0 62 flags: 0x00002000 63 reserved: 0x00000000 64 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 68 69# PPC:File: [[FILE]] 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) 82# PPC-NEXT: ] 83# PPC-NEXT:} 84# PPC-NOT:{{.}} 85 86--- !mach-o 87IsLittleEndian: false 88FileHeader: 89 magic: 0xFEEDFACE 90 cputype: 0x00000012 91 cpusubtype: 0x00000000 92 filetype: 0x00000001 93 ncmds: 0 94 sizeofcmds: 0 95 flags: 0x00002000 96 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 100 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) 114# PPC64-NEXT: ] 115# PPC64-NEXT: Reserved: 0x0 116# PPC64-NEXT:} 117# PPC64-NOT:{{.}} 118 119--- !mach-o 120IsLittleEndian: false 121FileHeader: 122 magic: 0xFEEDFACF 123 cputype: 0x01000012 124 cpusubtype: 0x00000000 125 filetype: 0x00000001 126 ncmds: 0 127 sizeofcmds: 0 128 flags: 0x00002000 129 reserved: 0x00000000 130 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 134 135# ARM:File: [[FILE]] 136# ARM-NEXT:Format: Mach-O arm 137# ARM-NEXT:Arch: 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) 148# ARM-NEXT: ] 149# ARM-NEXT:} 150# ARM-NOT:{{.}} 151 152--- !mach-o 153FileHeader: 154 magic: 0xFEEDFACE 155 cputype: 0x0000000C 156 cpusubtype: 0x00000009 157 filetype: 0x00000001 158 ncmds: 0 159 sizeofcmds: 0 160 flags: 0x00002000 161