1 //===-- llvm/Support/MachO.h - The MachO file format ------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines manifest constants for the MachO object file format.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_SUPPORT_MACHO_H
15 #define LLVM_SUPPORT_MACHO_H
17 #include "llvm/Support/DataTypes.h"
19 // NOTE: The enums in this file are intentially named to be different than those
20 // in the headers in /usr/include/mach (on darwin systems) to avoid conflicts
24 // Enums from <mach-o/loader.h>
26 // Constants for the "magic" field in llvm::MachO::mach_header and
27 // llvm::MachO::mach_header_64
28 HeaderMagic32 = 0xFEEDFACEu, // MH_MAGIC
29 HeaderMagic32Swapped = 0xCEFAEDFEu, // MH_CIGAM
30 HeaderMagic64 = 0xFEEDFACFu, // MH_MAGIC_64
31 HeaderMagic64Swapped = 0xCFFAEDFEu, // MH_CIGAM_64
32 UniversalMagic = 0xCAFEBABEu, // FAT_MAGIC
33 UniversalMagicSwapped = 0xBEBAFECAu, // FAT_CIGAM
35 // Constants for the "filetype" field in llvm::MachO::mach_header and
36 // llvm::MachO::mach_header_64
37 HeaderFileTypeObject = 0x1u, // MH_OBJECT
38 HeaderFileTypeExecutable = 0x2u, // MH_EXECUTE
39 HeaderFileTypeFixedVMShlib = 0x3u, // MH_FVMLIB
40 HeaderFileTypeCore = 0x4u, // MH_CORE
41 HeaderFileTypePreloadedExecutable = 0x5u, // MH_PRELOAD
42 HeaderFileTypeDynamicShlib = 0x6u, // MH_DYLIB
43 HeaderFileTypeDynamicLinkEditor = 0x7u, // MH_DYLINKER
44 HeaderFileTypeBundle = 0x8u, // MH_BUNDLE
45 HeaderFileTypeDynamicShlibStub = 0x9u, // MH_DYLIB_STUB
46 HeaderFileTypeDSYM = 0xAu, // MH_DSYM
47 HeaderFileTypeKextBundle = 0xBu, // MH_KEXT_BUNDLE
49 // Constant bits for the "flags" field in llvm::MachO::mach_header and
50 // llvm::MachO::mach_header_64
51 HeaderFlagBitNoUndefinedSymbols = 0x00000001u, // MH_NOUNDEFS
52 HeaderFlagBitIsIncrementalLinkObject= 0x00000002u, // MH_INCRLINK
53 HeaderFlagBitIsDynamicLinkObject = 0x00000004u, // MH_DYLDLINK
54 HeaderFlagBitBindAtLoad = 0x00000008u, // MH_BINDATLOAD
55 HeaderFlagBitPrebound = 0x00000010u, // MH_PREBOUND
56 HeaderFlagBitSplitSegments = 0x00000020u, // MH_SPLIT_SEGS
57 HeaderFlagBitLazyInit = 0x00000040u, // MH_LAZY_INIT
58 HeaderFlagBitTwoLevelNamespace = 0x00000080u, // MH_TWOLEVEL
59 HeaderFlagBitForceFlatNamespace = 0x00000100u, // MH_FORCE_FLAT
60 HeaderFlagBitNoMultipleDefintions = 0x00000200u, // MH_NOMULTIDEFS
61 HeaderFlagBitNoFixPrebinding = 0x00000400u, // MH_NOFIXPREBINDING
62 HeaderFlagBitPrebindable = 0x00000800u, // MH_PREBINDABLE
63 HeaderFlagBitAllModulesBound = 0x00001000u, // MH_ALLMODSBOUND
64 HeaderFlagBitSubsectionsViaSymbols = 0x00002000u, // MH_SUBSECTIONS_VIA_SYMBOLS
65 HeaderFlagBitCanonical = 0x00004000u, // MH_CANONICAL
66 HeaderFlagBitWeakDefines = 0x00008000u, // MH_WEAK_DEFINES
67 HeaderFlagBitBindsToWeak = 0x00010000u, // MH_BINDS_TO_WEAK
68 HeaderFlagBitAllowStackExecution = 0x00020000u, // MH_ALLOW_STACK_EXECUTION
69 HeaderFlagBitRootSafe = 0x00040000u, // MH_ROOT_SAFE
70 HeaderFlagBitSetUIDSafe = 0x00080000u, // MH_SETUID_SAFE
71 HeaderFlagBitNoReexportedDylibs = 0x00100000u, // MH_NO_REEXPORTED_DYLIBS
72 HeaderFlagBitPIE = 0x00200000u, // MH_PIE
73 HeaderFlagBitDeadStrippableDylib = 0x00400000u, // MH_DEAD_STRIPPABLE_DYLIB
75 // Constants for the "cmd" field in llvm::MachO::load_command
76 LoadCommandDynamicLinkerRequired = 0x80000000u, // LC_REQ_DYLD
77 LoadCommandSegment32 = 0x00000001u, // LC_SEGMENT
78 LoadCommandSymtab = 0x00000002u, // LC_SYMTAB
79 LoadCommandSymSeg = 0x00000003u, // LC_SYMSEG
80 LoadCommandThread = 0x00000004u, // LC_THREAD
81 LoadCommandUnixThread = 0x00000005u, // LC_UNIXTHREAD
82 LoadCommandFixedVMShlibLoad = 0x00000006u, // LC_LOADFVMLIB
83 LoadCommandFixedVMShlibIdent = 0x00000007u, // LC_IDFVMLIB
84 LoadCommandIdent = 0x00000008u, // LC_IDENT
85 LoadCommandFixedVMFileInclusion = 0x00000009u, // LC_FVMFILE
86 LoadCommandPrePage = 0x0000000Au, // LC_PREPAGE
87 LoadCommandDynamicSymtabInfo = 0x0000000Bu, // LC_DYSYMTAB
88 LoadCommandDylibLoad = 0x0000000Cu, // LC_LOAD_DYLIB
89 LoadCommandDylibIdent = 0x0000000Du, // LC_ID_DYLIB
90 LoadCommandDynamicLinkerLoad = 0x0000000Eu, // LC_LOAD_DYLINKER
91 LoadCommandDynamicLinkerIdent = 0x0000000Fu, // LC_ID_DYLINKER
92 LoadCommandDylibPrebound = 0x00000010u, // LC_PREBOUND_DYLIB
93 LoadCommandRoutines32 = 0x00000011u, // LC_ROUTINES
94 LoadCommandSubFramework = 0x00000012u, // LC_SUB_FRAMEWORK
95 LoadCommandSubUmbrella = 0x00000013u, // LC_SUB_UMBRELLA
96 LoadCommandSubClient = 0x00000014u, // LC_SUB_CLIENT
97 LoadCommandSubLibrary = 0x00000015u, // LC_SUB_LIBRARY
98 LoadCommandTwoLevelHints = 0x00000016u, // LC_TWOLEVEL_HINTS
99 LoadCommandPreBindChecksum = 0x00000017u, // LC_PREBIND_CKSUM
100 LoadCommandDylibLoadWeak = 0x80000018u, // LC_LOAD_WEAK_DYLIB
101 LoadCommandSegment64 = 0x00000019u, // LC_SEGMENT_64
102 LoadCommandRoutines64 = 0x0000001Au, // LC_ROUTINES_64
103 LoadCommandUUID = 0x0000001Bu, // LC_UUID
104 LoadCommandRunpath = 0x8000001Cu, // LC_RPATH
105 LoadCommandCodeSignature = 0x0000001Du, // LC_CODE_SIGNATURE
106 LoadCommandSegmentSplitInfo = 0x0000001Eu, // LC_SEGMENT_SPLIT_INFO
107 LoadCommandDylibReexport = 0x8000001Fu, // LC_REEXPORT_DYLIB
108 LoadCommandDylibLazyLoad = 0x00000020u, // LC_LAZY_LOAD_DYLIB
109 LoadCommandEncryptionInfo = 0x00000021u, // LC_ENCRYPTION_INFO
110 LoadCommandDynamicLinkerInfo = 0x00000022u, // LC_DYLD_INFO
111 LoadCommandDynamicLinkerInfoOnly = 0x80000022u, // LC_DYLD_INFO_ONLY
112 LoadCommandDylibLoadUpward = 0x80000023u, // LC_LOAD_UPWARD_DYLIB
114 // Constant bits for the "flags" field in llvm::MachO::segment_command
115 SegmentCommandFlagBitHighVM = 0x1u, // SG_HIGHVM
116 SegmentCommandFlagBitFixedVMLibrary = 0x2u, // SG_FVMLIB
117 SegmentCommandFlagBitNoRelocations = 0x4u, // SG_NORELOC
118 SegmentCommandFlagBitProtectedVersion1 = 0x8u, // SG_PROTECTED_VERSION_1
121 // Constant masks for the "flags" field in llvm::MachO::section and
122 // llvm::MachO::section_64
123 SectionFlagMaskSectionType = 0x000000ffu, // SECTION_TYPE
124 SectionFlagMaskAllAttributes = 0xffffff00u, // SECTION_ATTRIBUTES
125 SectionFlagMaskUserAttributes = 0xff000000u, // SECTION_ATTRIBUTES_USR
126 SectionFlagMaskSystemAttributes = 0x00ffff00u, // SECTION_ATTRIBUTES_SYS
128 // Constant masks for the "flags[7:0]" field in llvm::MachO::section and
129 // llvm::MachO::section_64 (mask "flags" with SECTION_TYPE)
130 SectionTypeRegular = 0x00u, // S_REGULAR
131 SectionTypeZeroFill = 0x01u, // S_ZEROFILL
132 SectionTypeCStringLiterals = 0x02u, // S_CSTRING_LITERALS
133 SectionType4ByteLiterals = 0x03u, // S_4BYTE_LITERALS
134 SectionType8ByteLiterals = 0x04u, // S_8BYTE_LITERALS
135 SectionTypeLiteralPointers = 0x05u, // S_LITERAL_POINTERS
136 SectionTypeNonLazySymbolPointers = 0x06u, // S_NON_LAZY_SYMBOL_POINTERS
137 SectionTypeLazySymbolPointers = 0x07u, // S_LAZY_SYMBOL_POINTERS
138 SectionTypeSymbolStubs = 0x08u, // S_SYMBOL_STUBS
139 SectionTypeModuleInitFunctionPointers = 0x09u, // S_MOD_INIT_FUNC_POINTERS
140 SectionTypeModuleTermFunctionPointers = 0x0au, // S_MOD_TERM_FUNC_POINTERS
141 SectionTypeCoalesced = 0x0bu, // S_COALESCED
142 SectionTypeZeroFillLarge = 0x0cu, // S_GB_ZEROFILL
143 SectionTypeInterposing = 0x0du, // S_INTERPOSING
144 SectionType16ByteLiterals = 0x0eu, // S_16BYTE_LITERALS
145 SectionTypeDTraceObjectFormat = 0x0fu, // S_DTRACE_DOF
146 SectionTypeLazyDylibSymbolPointers = 0x10u, // S_LAZY_DYLIB_SYMBOL_POINTERS
148 // Constant masks for the "flags[31:24]" field in llvm::MachO::section and
149 // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_USR)
150 SectionAttrUserPureInstructions = 0x80000000u, // S_ATTR_PURE_INSTRUCTIONS
151 SectionAttrUserNoTableOfContents = 0x40000000u, // S_ATTR_NO_TOC
152 SectionAttrUserCanStripStaticSymbols = 0x20000000u, // S_ATTR_STRIP_STATIC_SYMS
153 SectionAttrUserNoDeadStrip = 0x10000000u, // S_ATTR_NO_DEAD_STRIP
154 SectionAttrUserLiveSupport = 0x08000000u, // S_ATTR_LIVE_SUPPORT
155 SectionAttrUserSelfModifyingCode = 0x04000000u, // S_ATTR_SELF_MODIFYING_CODE
156 SectionAttrUserDebug = 0x02000000u, // S_ATTR_DEBUG
158 // Constant masks for the "flags[23:8]" field in llvm::MachO::section and
159 // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_SYS)
160 SectionAttrSytemSomeInstructions = 0x00000400u, // S_ATTR_SOME_INSTRUCTIONS
161 SectionAttrSytemHasExternalRelocations= 0x00000200u, // S_ATTR_EXT_RELOC
162 SectionAttrSytemHasLocalRelocations = 0x00000100u, // S_ATTR_LOC_RELOC
164 IndirectSymbolLocal = 0x80000000u, // INDIRECT_SYMBOL_LOCAL
165 IndirectSymbolAbsolute = 0x40000000u, // INDIRECT_SYMBOL_ABS
167 RebaseTypePointer = 1u, // REBASE_TYPE_POINTER
168 RebaseTypeTextAbsolute32 = 2u, // REBASE_TYPE_TEXT_ABSOLUTE32
169 RebaseTypeTextPCRelative32 = 3u, // REBASE_TYPE_TEXT_PCREL32
171 RebaseOpcodeMask = 0xF0u, // REBASE_OPCODE_MASK
172 RebaseImmediateMask = 0x0Fu, // REBASE_IMMEDIATE_MASK
173 RebaseOpcodeDone = 0x00u, // REBASE_OPCODE_DONE
174 RebaseOpcodeSetTypeImmediate = 0x10u, // REBASE_OPCODE_SET_TYPE_IMM
175 RebaseOpcodeSetSegmentAndOffsetULEB = 0x20u, // REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
176 RebaseOpcodeAddAddressULEB = 0x30u, // REBASE_OPCODE_ADD_ADDR_ULEB
177 RebaseOpcodeAddAddressImmediateScaled = 0x40u, // REBASE_OPCODE_ADD_ADDR_IMM_SCALED
178 RebaseOpcodeDoRebaseImmediateTimes = 0x50u, // REBASE_OPCODE_DO_REBASE_IMM_TIMES
179 RebaseOpcodeDoRebaseULEBTimes = 0x60u, // REBASE_OPCODE_DO_REBASE_ULEB_TIMES
180 RebaseOpcodeDoRebaseAddAddressULEB = 0x70u, // REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB
181 RebaseOpcodeDoRebaseULEBTimesSkippingULEB = 0x80u, // REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
184 BindTypePointer = 1u, // BIND_TYPE_POINTER
185 BindTypeTextAbsolute32 = 2u, // BIND_TYPE_TEXT_ABSOLUTE32
186 BindTypeTextPCRelative32 = 3u, // BIND_TYPE_TEXT_PCREL32
188 BindSpecialDylibSelf = 0u, // BIND_SPECIAL_DYLIB_SELF
189 BindSpecialDylibMainExecutable = -1u, // BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE
190 BindSpecialDylibFlatLookup = -2u, // BIND_SPECIAL_DYLIB_FLAT_LOOKUP
192 BindSymbolFlagsWeakImport = 0x1u, // BIND_SYMBOL_FLAGS_WEAK_IMPORT
193 BindSymbolFlagsNonWeakDefinition = 0x8u, // BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION
195 BindOpcodeMask = 0xF0u, // BIND_OPCODE_MASK
196 BindImmediateMask = 0x0Fu, // BIND_IMMEDIATE_MASK
197 BindOpcodeDone = 0x00u, // BIND_OPCODE_DONE
198 BindOpcodeSetDylibOrdinalImmediate = 0x10u, // BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
199 BindOpcodeSetDylibOrdinalULEB = 0x20u, // BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB
200 BindOpcodeSetDylibSpecialImmediate = 0x30u, // BIND_OPCODE_SET_DYLIB_SPECIAL_IMM
201 BindOpcodeSetSymbolTrailingFlagsImmediate = 0x40u, // BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
202 BindOpcodeSetTypeImmediate = 0x50u, // BIND_OPCODE_SET_TYPE_IMM
203 BindOpcodeSetAppendSLEB = 0x60u, // BIND_OPCODE_SET_ADDEND_SLEB
204 BindOpcodeSetSegmentAndOffsetULEB = 0x70u, // BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
205 BindOpcodeAddAddressULEB = 0x80u, // BIND_OPCODE_ADD_ADDR_ULEB
206 BindOpcodeDoBind = 0x90u, // BIND_OPCODE_DO_BIND
207 BindOpcodeDoBindAddAddressULEB = 0xA0u, // BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
208 BindOpcodeDoBindAddAddressImmediateScaled = 0xB0u, // BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
209 BindOpcodeDoBindULEBTimesSkippingULEB = 0xC0u, // BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB
211 ExportSymbolFlagsKindMask = 0x03u, // EXPORT_SYMBOL_FLAGS_KIND_MASK
212 ExportSymbolFlagsKindRegular = 0x00u, // EXPORT_SYMBOL_FLAGS_KIND_REGULAR
213 ExportSymbolFlagsKindThreadLocal = 0x01u, // EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL
214 ExportSymbolFlagsWeakDefinition = 0x04u, // EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION
215 ExportSymbolFlagsIndirectDefinition = 0x08u, // EXPORT_SYMBOL_FLAGS_INDIRECT_DEFINITION
216 ExportSymbolFlagsHasSpecializations = 0x10u, // EXPORT_SYMBOL_FLAGS_HAS_SPECIALIZATIONS
219 // Constant masks for the "n_type" field in llvm::MachO::nlist and
220 // llvm::MachO::nlist_64
221 NlistMaskStab = 0xe0, // N_STAB
222 NlistMaskPrivateExternal = 0x10, // N_PEXT
223 NlistMaskType = 0x0e, // N_TYPE
224 NlistMaskExternal = 0x01, // N_EXT
226 // Constants for the "n_type & N_TYPE" llvm::MachO::nlist and
227 // llvm::MachO::nlist_64
228 NListTypeUndefined = 0x0u, // N_UNDF
229 NListTypeAbsolute = 0x2u, // N_ABS
230 NListTypeSection = 0xeu, // N_SECT
231 NListTypePreboundUndefined = 0xcu, // N_PBUD
232 NListTypeIndirect = 0xau, // N_INDR
234 // Constant masks for the "n_sect" field in llvm::MachO::nlist and
235 // llvm::MachO::nlist_64
236 NListSectionNoSection = 0u, // NO_SECT
237 NListSectionMaxSection = 0xffu, // MAX_SECT
239 // Constant values for the "n_type" field in llvm::MachO::nlist and
240 // llvm::MachO::nlist_64 when "(n_type & NlistMaskStab) != 0"
241 StabGlobalSymbol = 0x20u, // N_GSYM
242 StabFunctionName = 0x22u, // N_FNAME
243 StabFunction = 0x24u, // N_FUN
244 StabStaticSymbol = 0x26u, // N_STSYM
245 StabLocalCommon = 0x28u, // N_LCSYM
246 StabBeginSymbol = 0x2Eu, // N_BNSYM
247 StabSourceFileOptions = 0x3Cu, // N_OPT
248 StabRegisterSymbol = 0x40u, // N_RSYM
249 StabSourceLine = 0x44u, // N_SLINE
250 StabEndSymbol = 0x4Eu, // N_ENSYM
251 StabStructureType = 0x60u, // N_SSYM
252 StabSourceFileName = 0x64u, // N_SO
253 StabObjectFileName = 0x66u, // N_OSO
254 StabLocalSymbol = 0x80u, // N_LSYM
255 StabBeginIncludeFileName = 0x82u, // N_BINCL
256 StabIncludeFileName = 0x84u, // N_SOL
257 StabCompilerParameters = 0x86u, // N_PARAMS
258 StabCompilerVersion = 0x88u, // N_VERSION
259 StabCompilerOptLevel = 0x8Au, // N_OLEVEL
260 StabParameter = 0xA0u, // N_PSYM
261 StabEndIncludeFile = 0xA2u, // N_EINCL
262 StabAlternateEntry = 0xA4u, // N_ENTRY
263 StabLeftBracket = 0xC0u, // N_LBRAC
264 StabDeletedIncludeFile = 0xC2u, // N_EXCL
265 StabRightBracket = 0xE0u, // N_RBRAC
266 StabBeginCommon = 0xE2u, // N_BCOMM
267 StabEndCommon = 0xE4u, // N_ECOMM
268 StabEndCommonLocal = 0xE8u, // N_ECOML
269 StabLength = 0xFEu // N_LENG
273 // Structs from <mach-o/loader.h>
285 struct mach_header_64 {
296 struct load_command {
301 struct segment_command {
315 struct segment_command_64 {
360 uint32_t minor_version;
361 uint32_t header_addr;
364 struct fvmlib_command {
367 struct fvmlib fvmlib;
373 uint32_t current_version;
374 uint32_t compatibility_version;
377 struct dylib_command {
383 struct sub_framework_command {
389 struct sub_client_command {
395 struct sub_umbrella_command {
398 uint32_t sub_umbrella;
401 struct sub_library_command {
404 uint32_t sub_library;
407 struct prebound_dylib_command {
412 uint32_t linked_modules;
415 struct dylinker_command {
421 struct thread_command {
426 struct routines_command {
429 uint32_t init_address;
430 uint32_t init_module;
439 struct routines_command_64 {
442 uint64_t init_address;
443 uint64_t init_module;
452 struct symtab_command {
461 struct dysymtab_command {
474 uint32_t extrefsymoff;
475 uint32_t nextrefsyms;
476 uint32_t indirectsymoff;
477 uint32_t nindirectsyms;
484 struct dylib_table_of_contents {
485 uint32_t symbol_index;
486 uint32_t module_index;
489 struct dylib_module {
490 uint32_t module_name;
499 uint32_t iinit_iterm;
500 uint32_t ninit_nterm;
501 uint32_t objc_module_info_addr;
502 uint32_t objc_module_info_size;
505 struct dylib_module_64 {
506 uint32_t module_name;
515 uint32_t iinit_iterm;
516 uint32_t ninit_nterm;
517 uint32_t objc_module_info_size;
518 uint64_t objc_module_info_addr;
521 struct dylib_reference {
527 struct twolevel_hints_command {
534 struct twolevel_hint {
535 uint32_t isub_image:8,
539 struct prebind_cksum_command {
545 struct uuid_command {
551 struct rpath_command {
557 struct linkedit_data_command {
564 struct encryption_info_command {
572 struct dyld_info_command {
576 uint32_t rebase_size;
579 uint32_t weak_bind_off;
580 uint32_t weak_bind_size;
581 uint32_t lazy_bind_off;
582 uint32_t lazy_bind_size;
584 uint32_t export_size;
587 struct symseg_command {
594 struct ident_command {
599 struct fvmfile_command {
603 uint32_t header_addr;
607 // Structs from <mach-o/fat.h>
621 // Structs from <mach-o/fat.h>
638 // Get/Set functions from <mach-o/nlist.h>
640 static inline uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc)
642 return (((n_desc) >> 8u) & 0xffu);
645 static inline void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal)
647 n_desc = (((n_desc) & 0x00ff) | (((ordinal) & 0xff) << 8));
650 static inline uint8_t GET_COMM_ALIGN (uint16_t n_desc)
652 return (n_desc >> 8u) & 0x0fu;
655 static inline void SET_COMM_ALIGN (uint16_t &n_desc, uint8_t align)
657 n_desc = ((n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u));
660 // Enums from <mach/machine.h>
662 // Capability bits used in the definition of cpu_type.
663 CPUArchMask = 0xff000000, // Mask for architecture bits
664 CPUArchABI64 = 0x01000000, // 64 bit ABI
666 // Constants for the cputype field.
668 CPUTypeX86_64 = CPUTypeI386 | CPUArchABI64,
672 CPUTypePowerPC64 = CPUTypePowerPC | CPUArchABI64,
675 // Constants for the cpusubtype field.
678 CPUSubType_I386_ALL = 3,
679 CPUSubType_X86_64_ALL = 3,
682 CPUSubType_ARM_ALL = 0,
683 CPUSubType_ARM_V4T = 5,
684 CPUSubType_ARM_V5 = 7,
685 CPUSubType_ARM_V6 = 6,
686 CPUSubType_ARM_V7 = 9,
689 CPUSubType_POWERPC_ALL = 0,
691 CPUSubType_SPARC_ALL = 0
693 } // end namespace MachO
694 } // end namespace llvm