LLVM  16.0.0git
MachO.h
Go to the documentation of this file.
1 //===-- llvm/BinaryFormat/MachO.h - The MachO file format -------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines manifest constants for the MachO object file format.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_BINARYFORMAT_MACHO_H
14 #define LLVM_BINARYFORMAT_MACHO_H
15 
16 #include "llvm/Support/Compiler.h"
17 #include "llvm/Support/DataTypes.h"
18 #include "llvm/Support/Error.h"
20 
21 namespace llvm {
22 
23 class Triple;
24 
25 namespace MachO {
26 // Enums from <mach-o/loader.h>
27 enum : uint32_t {
28  // Constants for the "magic" field in llvm::MachO::mach_header and
29  // llvm::MachO::mach_header_64
30  MH_MAGIC = 0xFEEDFACEu,
31  MH_CIGAM = 0xCEFAEDFEu,
32  MH_MAGIC_64 = 0xFEEDFACFu,
33  MH_CIGAM_64 = 0xCFFAEDFEu,
34  FAT_MAGIC = 0xCAFEBABEu,
35  FAT_CIGAM = 0xBEBAFECAu,
36  FAT_MAGIC_64 = 0xCAFEBABFu,
37  FAT_CIGAM_64 = 0xBFBAFECAu
38 };
39 
41  // Constants for the "filetype" field in llvm::MachO::mach_header and
42  // llvm::MachO::mach_header_64
43  MH_OBJECT = 0x1u,
44  MH_EXECUTE = 0x2u,
45  MH_FVMLIB = 0x3u,
46  MH_CORE = 0x4u,
47  MH_PRELOAD = 0x5u,
48  MH_DYLIB = 0x6u,
49  MH_DYLINKER = 0x7u,
50  MH_BUNDLE = 0x8u,
51  MH_DYLIB_STUB = 0x9u,
52  MH_DSYM = 0xAu,
54  MH_FILESET = 0xCu,
55 };
56 
57 enum {
58  // Constant bits for the "flags" field in llvm::MachO::mach_header and
59  // llvm::MachO::mach_header_64
60  MH_NOUNDEFS = 0x00000001u,
61  MH_INCRLINK = 0x00000002u,
62  MH_DYLDLINK = 0x00000004u,
63  MH_BINDATLOAD = 0x00000008u,
64  MH_PREBOUND = 0x00000010u,
65  MH_SPLIT_SEGS = 0x00000020u,
66  MH_LAZY_INIT = 0x00000040u,
67  MH_TWOLEVEL = 0x00000080u,
68  MH_FORCE_FLAT = 0x00000100u,
69  MH_NOMULTIDEFS = 0x00000200u,
70  MH_NOFIXPREBINDING = 0x00000400u,
71  MH_PREBINDABLE = 0x00000800u,
72  MH_ALLMODSBOUND = 0x00001000u,
74  MH_CANONICAL = 0x00004000u,
75  MH_WEAK_DEFINES = 0x00008000u,
76  MH_BINDS_TO_WEAK = 0x00010000u,
77  MH_ALLOW_STACK_EXECUTION = 0x00020000u,
78  MH_ROOT_SAFE = 0x00040000u,
79  MH_SETUID_SAFE = 0x00080000u,
80  MH_NO_REEXPORTED_DYLIBS = 0x00100000u,
81  MH_PIE = 0x00200000u,
82  MH_DEAD_STRIPPABLE_DYLIB = 0x00400000u,
83  MH_HAS_TLV_DESCRIPTORS = 0x00800000u,
84  MH_NO_HEAP_EXECUTION = 0x01000000u,
85  MH_APP_EXTENSION_SAFE = 0x02000000u,
87  MH_SIM_SUPPORT = 0x08000000u,
88  MH_DYLIB_IN_CACHE = 0x80000000u,
89 };
90 
91 enum : uint32_t {
92  // Flags for the "cmd" field in llvm::MachO::load_command
93  LC_REQ_DYLD = 0x80000000u
94 };
95 
96 #define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) LCName = LCValue,
97 
99 #include "llvm/BinaryFormat/MachO.def"
100 };
101 
102 #undef HANDLE_LOAD_COMMAND
103 
104 enum : uint32_t {
105  // Constant bits for the "flags" field in llvm::MachO::segment_command
106  SG_HIGHVM = 0x1u,
107  SG_FVMLIB = 0x2u,
108  SG_NORELOC = 0x4u,
110  SG_READ_ONLY = 0x10u,
111 
112  // Constant masks for the "flags" field in llvm::MachO::section and
113  // llvm::MachO::section_64
114  SECTION_TYPE = 0x000000ffu, // SECTION_TYPE
115  SECTION_ATTRIBUTES = 0xffffff00u, // SECTION_ATTRIBUTES
116  SECTION_ATTRIBUTES_USR = 0xff000000u, // SECTION_ATTRIBUTES_USR
117  SECTION_ATTRIBUTES_SYS = 0x00ffff00u // SECTION_ATTRIBUTES_SYS
118 };
119 
120 /// These are the section type and attributes fields. A MachO section can
121 /// have only one Type, but can have any of the attributes specified.
123  // Constant masks for the "flags[7:0]" field in llvm::MachO::section and
124  // llvm::MachO::section_64 (mask "flags" with SECTION_TYPE)
125 
126  /// S_REGULAR - Regular section.
127  S_REGULAR = 0x00u,
128  /// S_ZEROFILL - Zero fill on demand section.
129  S_ZEROFILL = 0x01u,
130  /// S_CSTRING_LITERALS - Section with literal C strings.
132  /// S_4BYTE_LITERALS - Section with 4 byte literals.
134  /// S_8BYTE_LITERALS - Section with 8 byte literals.
136  /// S_LITERAL_POINTERS - Section with pointers to literals.
138  /// S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
140  /// S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
142  /// S_SYMBOL_STUBS - Section with symbol stubs, byte size of stub in
143  /// the Reserved2 field.
144  S_SYMBOL_STUBS = 0x08u,
145  /// S_MOD_INIT_FUNC_POINTERS - Section with only function pointers for
146  /// initialization.
148  /// S_MOD_TERM_FUNC_POINTERS - Section with only function pointers for
149  /// termination.
151  /// S_COALESCED - Section contains symbols that are to be coalesced.
152  S_COALESCED = 0x0bu,
153  /// S_GB_ZEROFILL - Zero fill on demand section (that can be larger than 4
154  /// gigabytes).
155  S_GB_ZEROFILL = 0x0cu,
156  /// S_INTERPOSING - Section with only pairs of function pointers for
157  /// interposing.
158  S_INTERPOSING = 0x0du,
159  /// S_16BYTE_LITERALS - Section with only 16 byte literals.
161  /// S_DTRACE_DOF - Section contains DTrace Object Format.
162  S_DTRACE_DOF = 0x0fu,
163  /// S_LAZY_DYLIB_SYMBOL_POINTERS - Section with lazy symbol pointers to
164  /// lazy loaded dylibs.
166  /// S_THREAD_LOCAL_REGULAR - Thread local data section.
168  /// S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.
170  /// S_THREAD_LOCAL_VARIABLES - Section with thread local variable
171  /// structure data.
173  /// S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread
174  /// local structures.
176  /// S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local
177  /// variable initialization pointers to functions.
179  /// S_INIT_FUNC_OFFSETS - Section with 32-bit offsets to initializer
180  /// functions.
182 
184 };
185 
186 enum : uint32_t {
187  // Constant masks for the "flags[31:24]" field in llvm::MachO::section and
188  // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_USR)
189 
190  /// S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine
191  /// instructions.
193  /// S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be
194  /// in a ranlib table of contents.
195  S_ATTR_NO_TOC = 0x40000000u,
196  /// S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section
197  /// in files with the MY_DYLDLINK flag.
199  /// S_ATTR_NO_DEAD_STRIP - No dead stripping.
200  S_ATTR_NO_DEAD_STRIP = 0x10000000u,
201  /// S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.
202  S_ATTR_LIVE_SUPPORT = 0x08000000u,
203  /// S_ATTR_SELF_MODIFYING_CODE - Used with i386 code stubs written on by
204  /// dyld.
206  /// S_ATTR_DEBUG - A debug section.
207  S_ATTR_DEBUG = 0x02000000u,
208 
209  // Constant masks for the "flags[23:8]" field in llvm::MachO::section and
210  // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_SYS)
211 
212  /// S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.
214  /// S_ATTR_EXT_RELOC - Section has external relocation entries.
215  S_ATTR_EXT_RELOC = 0x00000200u,
216  /// S_ATTR_LOC_RELOC - Section has local relocation entries.
217  S_ATTR_LOC_RELOC = 0x00000100u,
218 
219  // Constant masks for the value of an indirect symbol in an indirect
220  // symbol table
221  INDIRECT_SYMBOL_LOCAL = 0x80000000u,
222  INDIRECT_SYMBOL_ABS = 0x40000000u
223 };
224 
226  // Constants for the "kind" field in a data_in_code_entry structure
232 };
233 
238 };
239 
240 enum { REBASE_OPCODE_MASK = 0xF0u, REBASE_IMMEDIATE_MASK = 0x0Fu };
241 
252 };
253 
254 enum BindType {
258 };
259 
265 };
266 
267 enum {
270 
273 };
274 
289 };
290 
291 enum {
296 };
297 
302 };
303 
304 enum {
305  // Constant masks for the "n_type" field in llvm::MachO::nlist and
306  // llvm::MachO::nlist_64
307  N_STAB = 0xe0,
308  N_PEXT = 0x10,
309  N_TYPE = 0x0e,
310  N_EXT = 0x01
311 };
312 
313 enum NListType : uint8_t {
314  // Constants for the "n_type & N_TYPE" llvm::MachO::nlist and
315  // llvm::MachO::nlist_64
316  N_UNDF = 0x0u,
317  N_ABS = 0x2u,
318  N_SECT = 0xeu,
319  N_PBUD = 0xcu,
320  N_INDR = 0xau
321 };
322 
324  // Constants for the "n_sect" field in llvm::MachO::nlist and
325  // llvm::MachO::nlist_64
326  NO_SECT = 0u,
327  MAX_SECT = 0xffu
328 };
329 
330 enum {
331  // Constant masks for the "n_desc" field in llvm::MachO::nlist and
332  // llvm::MachO::nlist_64
333  // The low 3 bits are the for the REFERENCE_TYPE.
341  // Flag bits (some overlap with the library ordinal bits).
342  N_ARM_THUMB_DEF = 0x0008u,
344  N_NO_DEAD_STRIP = 0x0020u,
345  N_WEAK_REF = 0x0040u,
346  N_WEAK_DEF = 0x0080u,
347  N_SYMBOL_RESOLVER = 0x0100u,
348  N_ALT_ENTRY = 0x0200u,
349  N_COLD_FUNC = 0x0400u,
350  // For undefined symbols coming from libraries, see GET_LIBRARY_ORDINAL()
351  // as these are in the top 8 bits.
356 };
357 
358 enum StabType {
359  // Constant values for the "n_type" field in llvm::MachO::nlist and
360  // llvm::MachO::nlist_64 when "(n_type & N_STAB) != 0"
361  N_GSYM = 0x20u,
362  N_FNAME = 0x22u,
363  N_FUN = 0x24u,
364  N_STSYM = 0x26u,
365  N_LCSYM = 0x28u,
366  N_BNSYM = 0x2Eu,
367  N_PC = 0x30u,
368  N_AST = 0x32u,
369  N_OPT = 0x3Cu,
370  N_RSYM = 0x40u,
371  N_SLINE = 0x44u,
372  N_ENSYM = 0x4Eu,
373  N_SSYM = 0x60u,
374  N_SO = 0x64u,
375  N_OSO = 0x66u,
376  N_LSYM = 0x80u,
377  N_BINCL = 0x82u,
378  N_SOL = 0x84u,
379  N_PARAMS = 0x86u,
380  N_VERSION = 0x88u,
381  N_OLEVEL = 0x8Au,
382  N_PSYM = 0xA0u,
383  N_EINCL = 0xA2u,
384  N_ENTRY = 0xA4u,
385  N_LBRAC = 0xC0u,
386  N_EXCL = 0xC2u,
387  N_RBRAC = 0xE0u,
388  N_BCOMM = 0xE2u,
389  N_ECOMM = 0xE4u,
390  N_ECOML = 0xE8u,
391  N_LENG = 0xFEu
392 };
393 
394 enum : uint32_t {
395  // Constant values for the r_symbolnum field in an
396  // llvm::MachO::relocation_info structure when r_extern is 0.
397  R_ABS = 0,
398 
399  // Constant bits for the r_address field in an
400  // llvm::MachO::relocation_info structure.
401  R_SCATTERED = 0x80000000
402 };
403 
405  // Constant values for the r_type field in an
406  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
407  // structure.
415 
416  // Constant values for the r_type field in a PowerPC architecture
417  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
418  // structure.
435 
436  // Constant values for the r_type field in an ARM architecture
437  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
438  // structure.
446  ARM_THUMB_32BIT_BRANCH = 7, // obsolete
449 
450  // Constant values for the r_type field in an ARM64 architecture
451  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
452  // structure.
453 
454  // For pointers.
456  // Must be followed by an ARM64_RELOC_UNSIGNED
458  // A B/BL instruction with 26-bit displacement.
460  // PC-rel distance to page of target.
462  // Offset within page, scaled by r_length.
464  // PC-rel distance to page of GOT slot.
466  // Offset within page of GOT slot, scaled by r_length.
468  // For pointers to GOT slots.
470  // PC-rel distance to page of TLVP slot.
472  // Offset within page of TLVP slot, scaled by r_length.
474  // Must be followed by ARM64_RELOC_PAGE21 or ARM64_RELOC_PAGEOFF12.
476 
477  // Constant values for the r_type field in an x86_64 architecture
478  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
479  // structure
490 };
491 
492 // Values for segment_command.initprot.
493 // From <mach/vm_prot.h>
494 enum { VM_PROT_READ = 0x1, VM_PROT_WRITE = 0x2, VM_PROT_EXECUTE = 0x4 };
495 
496 // Values for platform field in build_version_command.
509 };
510 
511 // Values for tools enum in build_tool_version.
512 enum { TOOL_CLANG = 1, TOOL_SWIFT = 2, TOOL_LD = 3 };
513 
514 // Structs from <mach-o/loader.h>
515 
516 struct mach_header {
524 };
525 
535 };
536 
537 struct load_command {
540 };
541 
545  char segname[16];
554 };
555 
559  char segname[16];
568 };
569 
570 struct section {
571  char sectname[16];
572  char segname[16];
582 };
583 
584 struct section_64 {
585  char sectname[16];
586  char segname[16];
597 };
598 
599 inline bool isVirtualSection(uint8_t type) {
600  return (type == MachO::S_ZEROFILL || type == MachO::S_GB_ZEROFILL ||
602 }
603 
604 struct fvmlib {
608 };
609 
610 // The fvmlib_command is obsolete and no longer supported.
614  struct fvmlib fvmlib;
615 };
616 
617 struct dylib {
622 };
623 
627  struct dylib dylib;
628 };
629 
634 };
635 
640 };
641 
646 };
647 
652 };
653 
654 // The prebound_dylib_command is obsolete and no longer supported.
661 };
662 
667 };
668 
672 };
673 
685 };
686 
698 };
699 
707 };
708 
730 };
731 
735 };
736 
737 struct dylib_module {
751 };
752 
767 };
768 
770  uint32_t isym : 24, flags : 8;
771 };
772 
773 // The twolevel_hints_command is obsolete and no longer supported.
779 };
780 
781 // The twolevel_hints_command is obsolete and no longer supported.
784 };
785 
786 // The prebind_cksum_command is obsolete and no longer supported.
791 };
792 
793 struct uuid_command {
796  uint8_t uuid[16];
797 };
798 
803 };
804 
810 };
811 
816 };
817 
822 };
823 
830 };
831 
839 };
840 
842  uint32_t cmd; // LC_VERSION_MIN_MACOSX or
843  // LC_VERSION_MIN_IPHONEOS
844  uint32_t cmdsize; // sizeof(struct version_min_command)
845  uint32_t version; // X.Y.Z is encoded in nibbles xxxx.yy.zz
846  uint32_t sdk; // X.Y.Z is encoded in nibbles xxxx.yy.zz
847 };
848 
849 struct note_command {
850  uint32_t cmd; // LC_NOTE
851  uint32_t cmdsize; // sizeof(struct note_command)
852  char data_owner[16]; // owner name for this LC_NOTE
853  uint64_t offset; // file offset of this data
854  uint64_t size; // length of data region
855 };
856 
858  uint32_t tool; // enum for the tool
859  uint32_t version; // version of the tool
860 };
861 
863  uint32_t cmd; // LC_BUILD_VERSION
864  uint32_t cmdsize; // sizeof(struct build_version_command) +
865  // ntools * sizeof(struct build_tool_version)
866  uint32_t platform; // platform
867  uint32_t minos; // X.Y.Z is encoded in nibbles xxxx.yy.zz
868  uint32_t sdk; // X.Y.Z is encoded in nibbles xxxx.yy.zz
869  uint32_t ntools; // number of tool entries following this
870 };
871 
876 };
877 
891 };
892 
897 };
898 
905 };
906 
907 // The symseg_command is obsolete and no longer supported.
913 };
914 
915 // The ident_command is obsolete and no longer supported.
919 };
920 
921 // The fvmfile_command is obsolete and no longer supported.
927 };
928 
933 };
934 
939 };
940 
942  uintptr_t thunk;
943  uintptr_t key;
944  uintptr_t offset;
945 };
946 
952 };
953 
954 // Structs from <mach-o/fat.h>
955 struct fat_header {
958 };
959 
960 struct fat_arch {
966 };
967 
968 struct fat_arch_64 {
975 };
976 
977 // Structs from <mach-o/reloc.h>
979  int32_t r_address;
981  r_type : 4;
982 };
983 
985 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN)
986  uint32_t r_scattered : 1, r_pcrel : 1, r_length : 2, r_type : 4,
987  r_address : 24;
988 #else
989  uint32_t r_address : 24, r_type : 4, r_length : 2, r_pcrel : 1,
991 #endif
992  int32_t r_value;
993 };
994 
995 // Structs NOT from <mach-o/reloc.h>, but that make LLVM's life easier
998 };
999 
1000 // Structs from <mach-o/nlist.h>
1001 struct nlist_base {
1003  uint8_t n_type;
1004  uint8_t n_sect;
1006 };
1007 
1008 struct nlist {
1010  uint8_t n_type;
1011  uint8_t n_sect;
1012  int16_t n_desc;
1014 };
1015 
1016 struct nlist_64 {
1018  uint8_t n_type;
1019  uint8_t n_sect;
1022 };
1023 
1024 // Values for dyld_chained_fixups_header::imports_format.
1029 };
1030 
1031 // Values for dyld_chained_fixups_header::symbols_format.
1032 enum {
1035 };
1036 
1037 // Values for dyld_chained_starts_in_segment::page_start.
1038 enum {
1042 };
1043 
1044 // Values for dyld_chained_starts_in_segment::pointer_format.
1045 enum {
1058 };
1059 
1060 /// Structs for dyld chained fixups.
1061 /// dyld_chained_fixups_header is the data pointed to by LC_DYLD_CHAINED_FIXUPS
1062 /// load command.
1065  uint32_t starts_offset; ///< Offset of dyld_chained_starts_in_image.
1066  uint32_t imports_offset; ///< Offset of imports table in chain_data.
1067  uint32_t symbols_offset; ///< Offset of symbol strings in chain_data.
1068  uint32_t imports_count; ///< Number of imported symbol names.
1069  uint32_t imports_format; ///< DYLD_CHAINED_IMPORT*
1070  uint32_t symbols_format; ///< 0 => uncompressed, 1 => zlib compressed
1071 };
1072 
1073 /// dyld_chained_starts_in_image is embedded in LC_DYLD_CHAINED_FIXUPS payload.
1074 /// Each each seg_info_offset entry is the offset into this struct for that
1075 /// segment followed by pool of dyld_chain_starts_in_segment data.
1079 };
1080 
1082  uint32_t size; ///< Size of this, including chain_starts entries
1083  uint16_t page_size; ///< Page size in bytes (0x1000 or 0x4000)
1084  uint16_t pointer_format; ///< DYLD_CHAINED_PTR*
1085  uint64_t segment_offset; ///< VM offset from the __TEXT segment
1086  uint32_t max_valid_pointer; ///< Values beyond this are not pointers on 32-bit
1087  uint16_t page_count; ///< Length of the page_start array
1088  uint16_t page_start[1]; ///< Page offset of first fixup on each page, or
1089  ///< DYLD_CHAINED_PTR_START_NONE if no fixups
1090 };
1091 
1092 // DYLD_CHAINED_IMPORT
1097 };
1098 
1099 // DYLD_CHAINED_IMPORT_ADDEND
1104  int32_t addend;
1105 };
1106 
1107 // DYLD_CHAINED_IMPORT_ADDEND64
1114 };
1115 
1116 // The `bind` field (most significant bit) of the encoded fixup determines
1117 // whether it is dyld_chained_ptr_64_bind or dyld_chained_ptr_64_rebase.
1118 
1119 // DYLD_CHAINED_PTR_64/DYLD_CHAINED_PTR_64_OFFSET
1125  uint64_t bind : 1; // set to 1
1126 };
1127 
1128 // DYLD_CHAINED_PTR_64/DYLD_CHAINED_PTR_64_OFFSET
1134  uint64_t bind : 1; // set to 0
1135 };
1136 
1137 // Byte order swapping functions for MachO structs
1138 
1139 inline void swapStruct(fat_header &mh) {
1142 }
1143 
1144 inline void swapStruct(fat_arch &mh) {
1150 }
1151 
1152 inline void swapStruct(fat_arch_64 &mh) {
1159 }
1160 
1161 inline void swapStruct(mach_header &mh) {
1169 }
1170 
1171 inline void swapStruct(mach_header_64 &H) {
1172  sys::swapByteOrder(H.magic);
1173  sys::swapByteOrder(H.cputype);
1174  sys::swapByteOrder(H.cpusubtype);
1175  sys::swapByteOrder(H.filetype);
1176  sys::swapByteOrder(H.ncmds);
1177  sys::swapByteOrder(H.sizeofcmds);
1178  sys::swapByteOrder(H.flags);
1179  sys::swapByteOrder(H.reserved);
1180 }
1181 
1182 inline void swapStruct(load_command &lc) {
1183  sys::swapByteOrder(lc.cmd);
1185 }
1186 
1187 inline void swapStruct(symtab_command &lc) {
1188  sys::swapByteOrder(lc.cmd);
1194 }
1195 
1196 inline void swapStruct(segment_command_64 &seg) {
1197  sys::swapByteOrder(seg.cmd);
1207 }
1208 
1209 inline void swapStruct(segment_command &seg) {
1210  sys::swapByteOrder(seg.cmd);
1220 }
1221 
1222 inline void swapStruct(section_64 &sect) {
1223  sys::swapByteOrder(sect.addr);
1224  sys::swapByteOrder(sect.size);
1225  sys::swapByteOrder(sect.offset);
1226  sys::swapByteOrder(sect.align);
1227  sys::swapByteOrder(sect.reloff);
1228  sys::swapByteOrder(sect.nreloc);
1229  sys::swapByteOrder(sect.flags);
1232 }
1233 
1234 inline void swapStruct(section &sect) {
1235  sys::swapByteOrder(sect.addr);
1236  sys::swapByteOrder(sect.size);
1237  sys::swapByteOrder(sect.offset);
1238  sys::swapByteOrder(sect.align);
1239  sys::swapByteOrder(sect.reloff);
1240  sys::swapByteOrder(sect.nreloc);
1241  sys::swapByteOrder(sect.flags);
1244 }
1245 
1247  sys::swapByteOrder(info.cmd);
1248  sys::swapByteOrder(info.cmdsize);
1249  sys::swapByteOrder(info.rebase_off);
1250  sys::swapByteOrder(info.rebase_size);
1251  sys::swapByteOrder(info.bind_off);
1252  sys::swapByteOrder(info.bind_size);
1253  sys::swapByteOrder(info.weak_bind_off);
1254  sys::swapByteOrder(info.weak_bind_size);
1255  sys::swapByteOrder(info.lazy_bind_off);
1256  sys::swapByteOrder(info.lazy_bind_size);
1257  sys::swapByteOrder(info.export_off);
1258  sys::swapByteOrder(info.export_size);
1259 }
1260 
1261 inline void swapStruct(dylib_command &d) {
1262  sys::swapByteOrder(d.cmd);
1263  sys::swapByteOrder(d.cmdsize);
1264  sys::swapByteOrder(d.dylib.name);
1265  sys::swapByteOrder(d.dylib.timestamp);
1266  sys::swapByteOrder(d.dylib.current_version);
1267  sys::swapByteOrder(d.dylib.compatibility_version);
1268 }
1269 
1271  sys::swapByteOrder(s.cmd);
1272  sys::swapByteOrder(s.cmdsize);
1273  sys::swapByteOrder(s.umbrella);
1274 }
1275 
1277  sys::swapByteOrder(s.cmd);
1278  sys::swapByteOrder(s.cmdsize);
1279  sys::swapByteOrder(s.sub_umbrella);
1280 }
1281 
1283  sys::swapByteOrder(s.cmd);
1284  sys::swapByteOrder(s.cmdsize);
1285  sys::swapByteOrder(s.sub_library);
1286 }
1287 
1289  sys::swapByteOrder(s.cmd);
1290  sys::swapByteOrder(s.cmdsize);
1291  sys::swapByteOrder(s.client);
1292 }
1293 
1294 inline void swapStruct(routines_command &r) {
1305 }
1306 
1318 }
1319 
1320 inline void swapStruct(thread_command &t) {
1321  sys::swapByteOrder(t.cmd);
1322  sys::swapByteOrder(t.cmdsize);
1323 }
1324 
1326  sys::swapByteOrder(d.cmd);
1327  sys::swapByteOrder(d.cmdsize);
1328  sys::swapByteOrder(d.name);
1329 }
1330 
1331 inline void swapStruct(uuid_command &u) {
1334 }
1335 
1336 inline void swapStruct(rpath_command &r) {
1340 }
1341 
1343  sys::swapByteOrder(s.cmd);
1344  sys::swapByteOrder(s.cmdsize);
1345  sys::swapByteOrder(s.version);
1346 }
1347 
1349  sys::swapByteOrder(e.cmd);
1350  sys::swapByteOrder(e.cmdsize);
1351  sys::swapByteOrder(e.entryoff);
1352  sys::swapByteOrder(e.stacksize);
1353 }
1354 
1356  sys::swapByteOrder(e.cmd);
1357  sys::swapByteOrder(e.cmdsize);
1358  sys::swapByteOrder(e.cryptoff);
1359  sys::swapByteOrder(e.cryptsize);
1360  sys::swapByteOrder(e.cryptid);
1361 }
1362 
1364  sys::swapByteOrder(e.cmd);
1365  sys::swapByteOrder(e.cmdsize);
1366  sys::swapByteOrder(e.cryptoff);
1367  sys::swapByteOrder(e.cryptsize);
1368  sys::swapByteOrder(e.cryptid);
1369  sys::swapByteOrder(e.pad);
1370 }
1371 
1372 inline void swapStruct(dysymtab_command &dst) {
1373  sys::swapByteOrder(dst.cmd);
1382  sys::swapByteOrder(dst.ntoc);
1393 }
1394 
1395 inline void swapStruct(any_relocation_info &reloc) {
1396  sys::swapByteOrder(reloc.r_word0);
1397  sys::swapByteOrder(reloc.r_word1);
1398 }
1399 
1400 inline void swapStruct(nlist_base &S) {
1401  sys::swapByteOrder(S.n_strx);
1402  sys::swapByteOrder(S.n_desc);
1403 }
1404 
1405 inline void swapStruct(nlist &sym) {
1409 }
1410 
1411 inline void swapStruct(nlist_64 &sym) {
1415 }
1416 
1418  sys::swapByteOrder(C.cmd);
1419  sys::swapByteOrder(C.cmdsize);
1420  sys::swapByteOrder(C.dataoff);
1421  sys::swapByteOrder(C.datasize);
1422 }
1423 
1425  sys::swapByteOrder(C.cmd);
1426  sys::swapByteOrder(C.cmdsize);
1427  sys::swapByteOrder(C.count);
1428 }
1429 
1431  sys::swapByteOrder(C.cmd);
1432  sys::swapByteOrder(C.cmdsize);
1433  sys::swapByteOrder(C.vmaddr);
1434  sys::swapByteOrder(C.fileoff);
1435  sys::swapByteOrder(C.entry_id);
1436 }
1437 
1439  sys::swapByteOrder(C.cmd);
1440  sys::swapByteOrder(C.cmdsize);
1441  sys::swapByteOrder(C.version);
1442  sys::swapByteOrder(C.sdk);
1443 }
1444 
1445 inline void swapStruct(note_command &C) {
1446  sys::swapByteOrder(C.cmd);
1447  sys::swapByteOrder(C.cmdsize);
1448  sys::swapByteOrder(C.offset);
1449  sys::swapByteOrder(C.size);
1450 }
1451 
1453  sys::swapByteOrder(C.cmd);
1454  sys::swapByteOrder(C.cmdsize);
1455  sys::swapByteOrder(C.platform);
1456  sys::swapByteOrder(C.minos);
1457  sys::swapByteOrder(C.sdk);
1458  sys::swapByteOrder(C.ntools);
1459 }
1460 
1462  sys::swapByteOrder(C.tool);
1463  sys::swapByteOrder(C.version);
1464 }
1465 
1467  sys::swapByteOrder(C.offset);
1468  sys::swapByteOrder(C.length);
1469  sys::swapByteOrder(C.kind);
1470 }
1471 
1473 
1474 // The prebind_cksum_command is obsolete and no longer supported.
1476  sys::swapByteOrder(C.cmd);
1477  sys::swapByteOrder(C.cmdsize);
1478  sys::swapByteOrder(C.cksum);
1479 }
1480 
1481 // The twolevel_hints_command is obsolete and no longer supported.
1483  sys::swapByteOrder(C.cmd);
1484  sys::swapByteOrder(C.cmdsize);
1485  sys::swapByteOrder(C.offset);
1486  sys::swapByteOrder(C.nhints);
1487 }
1488 
1489 // The prebound_dylib_command is obsolete and no longer supported.
1491  sys::swapByteOrder(C.cmd);
1492  sys::swapByteOrder(C.cmdsize);
1493  sys::swapByteOrder(C.name);
1494  sys::swapByteOrder(C.nmodules);
1495  sys::swapByteOrder(C.linked_modules);
1496 }
1497 
1498 // The fvmfile_command is obsolete and no longer supported.
1500  sys::swapByteOrder(C.cmd);
1501  sys::swapByteOrder(C.cmdsize);
1502  sys::swapByteOrder(C.name);
1503  sys::swapByteOrder(C.header_addr);
1504 }
1505 
1506 // The symseg_command is obsolete and no longer supported.
1507 inline void swapStruct(symseg_command &C) {
1508  sys::swapByteOrder(C.cmd);
1509  sys::swapByteOrder(C.cmdsize);
1510  sys::swapByteOrder(C.offset);
1511  sys::swapByteOrder(C.size);
1512 }
1513 
1514 // The ident_command is obsolete and no longer supported.
1515 inline void swapStruct(ident_command &C) {
1516  sys::swapByteOrder(C.cmd);
1517  sys::swapByteOrder(C.cmdsize);
1518 }
1519 
1520 inline void swapStruct(fvmlib &C) {
1521  sys::swapByteOrder(C.name);
1522  sys::swapByteOrder(C.minor_version);
1523  sys::swapByteOrder(C.header_addr);
1524 }
1525 
1526 // The fvmlib_command is obsolete and no longer supported.
1527 inline void swapStruct(fvmlib_command &C) {
1528  sys::swapByteOrder(C.cmd);
1529  sys::swapByteOrder(C.cmdsize);
1530  swapStruct(C.fvmlib);
1531 }
1532 
1533 // Get/Set functions from <mach-o/nlist.h>
1534 
1536  return (((n_desc) >> 8u) & 0xffu);
1537 }
1538 
1539 inline void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal) {
1540  n_desc = (((n_desc)&0x00ff) | (((ordinal)&0xff) << 8));
1541 }
1542 
1543 inline uint8_t GET_COMM_ALIGN(uint16_t n_desc) {
1544  return (n_desc >> 8u) & 0x0fu;
1545 }
1546 
1547 inline void SET_COMM_ALIGN(uint16_t &n_desc, uint8_t align) {
1548  n_desc = ((n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u));
1549 }
1550 
1551 // Enums from <mach/machine.h>
1552 enum : uint32_t {
1553  // Capability bits used in the definition of cpu_type.
1554  CPU_ARCH_MASK = 0xff000000, // Mask for architecture bits
1555  CPU_ARCH_ABI64 = 0x01000000, // 64 bit ABI
1556  CPU_ARCH_ABI64_32 = 0x02000000, // ILP32 ABI on 64-bit hardware
1557 };
1558 
1559 // Constants for the cputype field.
1560 enum CPUType {
1565  /* CPU_TYPE_MIPS = 8, */
1566  CPU_TYPE_MC98000 = 10, // Old Motorola PowerPC
1573 };
1574 
1575 enum : uint32_t {
1576  // Capability bits used in the definition of cpusubtype.
1577  CPU_SUBTYPE_MASK = 0xff000000, // Mask for architecture bits
1578  CPU_SUBTYPE_LIB64 = 0x80000000, // 64 bit libraries
1579 
1580  // Special CPU subtype constants.
1582 };
1583 
1584 // Constants for the cpusubtype field.
1607 
1612 };
1613 inline int CPU_SUBTYPE_INTEL(int Family, int Model) {
1614  return Family | (Model << 4);
1615 }
1617  return ((int)ST) & 0x0f;
1618 }
1619 inline int CPU_SUBTYPE_INTEL_MODEL(CPUSubTypeX86 ST) { return ((int)ST) >> 4; }
1621 
1630  // unused ARM_V7F = 10,
1636 };
1637 
1642 };
1643 
1645 
1647 
1662 
1665 };
1666 
1669 
1687 };
1688 
1711 };
1712 
1717 };
1718 
1724 };
1725 
1727  unsigned short invalid : 1, denorm : 1, zdiv : 1, ovrfl : 1, undfl : 1,
1728  precis : 1, : 2, pc : 2, rc : 2, : 1, : 3;
1729 };
1730 
1731 struct fp_status_t {
1732  unsigned short invalid : 1, denorm : 1, zdiv : 1, ovrfl : 1, undfl : 1,
1733  precis : 1, stkflt : 1, errsumm : 1, c0 : 1, c1 : 1, c2 : 1, tos : 3,
1734  c3 : 1, busy : 1;
1735 };
1736 
1737 struct mmst_reg_t {
1738  char mmst_reg[10];
1739  char mmst_rsrv[6];
1740 };
1741 
1742 struct xmm_reg_t {
1743  char xmm_reg[16];
1744 };
1745 
1747  int32_t fpu_reserved[2];
1750  uint8_t fpu_ftw;
1751  uint8_t fpu_rsrv1;
1785  char fpu_rsrv4[6 * 16];
1787 };
1788 
1794 };
1795 
1797  sys::swapByteOrder(x.eax);
1798  sys::swapByteOrder(x.ebx);
1799  sys::swapByteOrder(x.ecx);
1800  sys::swapByteOrder(x.edx);
1801  sys::swapByteOrder(x.edi);
1802  sys::swapByteOrder(x.esi);
1803  sys::swapByteOrder(x.ebp);
1804  sys::swapByteOrder(x.esp);
1805  sys::swapByteOrder(x.ss);
1806  sys::swapByteOrder(x.eflags);
1807  sys::swapByteOrder(x.eip);
1808  sys::swapByteOrder(x.cs);
1809  sys::swapByteOrder(x.ds);
1810  sys::swapByteOrder(x.es);
1811  sys::swapByteOrder(x.fs);
1812  sys::swapByteOrder(x.gs);
1813 }
1814 
1816  sys::swapByteOrder(x.rax);
1817  sys::swapByteOrder(x.rbx);
1818  sys::swapByteOrder(x.rcx);
1819  sys::swapByteOrder(x.rdx);
1820  sys::swapByteOrder(x.rdi);
1821  sys::swapByteOrder(x.rsi);
1822  sys::swapByteOrder(x.rbp);
1823  sys::swapByteOrder(x.rsp);
1824  sys::swapByteOrder(x.r8);
1825  sys::swapByteOrder(x.r9);
1826  sys::swapByteOrder(x.r10);
1827  sys::swapByteOrder(x.r11);
1828  sys::swapByteOrder(x.r12);
1829  sys::swapByteOrder(x.r13);
1830  sys::swapByteOrder(x.r14);
1831  sys::swapByteOrder(x.r15);
1832  sys::swapByteOrder(x.rip);
1833  sys::swapByteOrder(x.rflags);
1834  sys::swapByteOrder(x.cs);
1835  sys::swapByteOrder(x.fs);
1836  sys::swapByteOrder(x.gs);
1837 }
1838 
1840  sys::swapByteOrder(x.fpu_reserved[0]);
1841  sys::swapByteOrder(x.fpu_reserved[1]);
1842  // TODO swap: fp_control_t fpu_fcw;
1843  // TODO swap: fp_status_t fpu_fsw;
1844  sys::swapByteOrder(x.fpu_fop);
1845  sys::swapByteOrder(x.fpu_ip);
1846  sys::swapByteOrder(x.fpu_cs);
1847  sys::swapByteOrder(x.fpu_rsrv2);
1848  sys::swapByteOrder(x.fpu_dp);
1849  sys::swapByteOrder(x.fpu_ds);
1850  sys::swapByteOrder(x.fpu_rsrv3);
1851  sys::swapByteOrder(x.fpu_mxcsr);
1852  sys::swapByteOrder(x.fpu_mxcsrmask);
1853  sys::swapByteOrder(x.fpu_reserved1);
1854 }
1855 
1857  sys::swapByteOrder(x.trapno);
1858  sys::swapByteOrder(x.cpu);
1859  sys::swapByteOrder(x.err);
1860  sys::swapByteOrder(x.faultvaddr);
1861 }
1862 
1866 };
1867 
1870  union {
1873  } uts;
1874 };
1875 
1878  union {
1880  } ufs;
1881 };
1882 
1885  union {
1887  } ues;
1888 };
1889 
1891  sys::swapByteOrder(x.flavor);
1892  sys::swapByteOrder(x.count);
1893 }
1894 
1908 };
1909 
1911  swapStruct(x.tsh);
1912  if (x.tsh.flavor == x86_THREAD_STATE64)
1913  swapStruct(x.uts.ts64);
1914 }
1915 
1917  swapStruct(x.fsh);
1918  if (x.fsh.flavor == x86_FLOAT_STATE64)
1919  swapStruct(x.ufs.fs64);
1920 }
1921 
1923  swapStruct(x.esh);
1924  if (x.esh.flavor == x86_EXCEPTION_STATE64)
1925  swapStruct(x.ues.es64);
1926 }
1927 
1929  sizeof(x86_thread_state32_t) / sizeof(uint32_t);
1930 
1932  sizeof(x86_thread_state64_t) / sizeof(uint32_t);
1934  sizeof(x86_float_state64_t) / sizeof(uint32_t);
1936  sizeof(x86_exception_state64_t) / sizeof(uint32_t);
1937 
1939  sizeof(x86_thread_state_t) / sizeof(uint32_t);
1941  sizeof(x86_float_state_t) / sizeof(uint32_t);
1943  sizeof(x86_exception_state_t) / sizeof(uint32_t);
1944 
1951 };
1952 
1954  for (int i = 0; i < 13; i++)
1955  sys::swapByteOrder(x.r[i]);
1956  sys::swapByteOrder(x.sp);
1957  sys::swapByteOrder(x.lr);
1958  sys::swapByteOrder(x.pc);
1959  sys::swapByteOrder(x.cpsr);
1960 }
1961 
1970 };
1971 
1973  for (int i = 0; i < 29; i++)
1974  sys::swapByteOrder(x.x[i]);
1975  sys::swapByteOrder(x.fp);
1976  sys::swapByteOrder(x.lr);
1977  sys::swapByteOrder(x.sp);
1978  sys::swapByteOrder(x.pc);
1979  sys::swapByteOrder(x.cpsr);
1980 }
1981 
1985 };
1986 
1989  union {
1991  } uts;
1992 };
1993 
1995  sys::swapByteOrder(x.flavor);
1996  sys::swapByteOrder(x.count);
1997 }
1998 
2007 };
2008 
2010  swapStruct(x.tsh);
2011  if (x.tsh.flavor == ARM_THREAD_STATE)
2012  swapStruct(x.uts.ts32);
2013 }
2014 
2016  sizeof(arm_thread_state32_t) / sizeof(uint32_t);
2017 
2019  sizeof(arm_thread_state64_t) / sizeof(uint32_t);
2020 
2062 };
2063 
2065  sys::swapByteOrder(x.srr0);
2066  sys::swapByteOrder(x.srr1);
2067  sys::swapByteOrder(x.r0);
2068  sys::swapByteOrder(x.r1);
2069  sys::swapByteOrder(x.r2);
2070  sys::swapByteOrder(x.r3);
2071  sys::swapByteOrder(x.r4);
2072  sys::swapByteOrder(x.r5);
2073  sys::swapByteOrder(x.r6);
2074  sys::swapByteOrder(x.r7);
2075  sys::swapByteOrder(x.r8);
2076  sys::swapByteOrder(x.r9);
2077  sys::swapByteOrder(x.r10);
2078  sys::swapByteOrder(x.r11);
2079  sys::swapByteOrder(x.r12);
2080  sys::swapByteOrder(x.r13);
2081  sys::swapByteOrder(x.r14);
2082  sys::swapByteOrder(x.r15);
2083  sys::swapByteOrder(x.r16);
2084  sys::swapByteOrder(x.r17);
2085  sys::swapByteOrder(x.r18);
2086  sys::swapByteOrder(x.r19);
2087  sys::swapByteOrder(x.r20);
2088  sys::swapByteOrder(x.r21);
2089  sys::swapByteOrder(x.r22);
2090  sys::swapByteOrder(x.r23);
2091  sys::swapByteOrder(x.r24);
2092  sys::swapByteOrder(x.r25);
2093  sys::swapByteOrder(x.r26);
2094  sys::swapByteOrder(x.r27);
2095  sys::swapByteOrder(x.r28);
2096  sys::swapByteOrder(x.r29);
2097  sys::swapByteOrder(x.r30);
2098  sys::swapByteOrder(x.r31);
2099  sys::swapByteOrder(x.ct);
2100  sys::swapByteOrder(x.xer);
2101  sys::swapByteOrder(x.lr);
2102  sys::swapByteOrder(x.ctr);
2103  sys::swapByteOrder(x.mq);
2104  sys::swapByteOrder(x.vrsave);
2105 }
2106 
2110 };
2111 
2114  union {
2116  } uts;
2117 };
2118 
2120  sys::swapByteOrder(x.flavor);
2121  sys::swapByteOrder(x.count);
2122 }
2123 
2132 };
2133 
2135  swapStruct(x.tsh);
2136  if (x.tsh.flavor == PPC_THREAD_STATE)
2137  swapStruct(x.uts.ts32);
2138 }
2139 
2141  sizeof(ppc_thread_state32_t) / sizeof(uint32_t);
2142 
2143 // Define a union of all load command structs
2144 #define LOAD_COMMAND_STRUCT(LCStruct) LCStruct LCStruct##_data;
2145 
2147 union alignas(4) macho_load_command {
2148 #include "llvm/BinaryFormat/MachO.def"
2149 };
2151 
2153  sys::swapByteOrder(C.fixups_version);
2154  sys::swapByteOrder(C.starts_offset);
2155  sys::swapByteOrder(C.imports_offset);
2156  sys::swapByteOrder(C.symbols_offset);
2157  sys::swapByteOrder(C.imports_count);
2158  sys::swapByteOrder(C.imports_format);
2159  sys::swapByteOrder(C.symbols_format);
2160 }
2161 
2163  sys::swapByteOrder(C.seg_count);
2164  // getStructOrErr() cannot copy the variable-length seg_info_offset array.
2165  // Its elements must be byte swapped manually.
2166 }
2167 
2169  sys::swapByteOrder(C.size);
2170  sys::swapByteOrder(C.page_size);
2171  sys::swapByteOrder(C.pointer_format);
2172  sys::swapByteOrder(C.segment_offset);
2173  sys::swapByteOrder(C.max_valid_pointer);
2174  sys::swapByteOrder(C.page_count);
2175  // seg_info_offset entries must be byte swapped manually.
2176 }
2177 
2178 /* code signing attributes of a process */
2179 
2181  CS_VALID = 0x00000001, /* dynamically valid */
2182  CS_ADHOC = 0x00000002, /* ad hoc signed */
2183  CS_GET_TASK_ALLOW = 0x00000004, /* has get-task-allow entitlement */
2184  CS_INSTALLER = 0x00000008, /* has installer entitlement */
2185 
2187  0x00000010, /* Library Validation required by Hardened System Policy */
2188  CS_INVALID_ALLOWED = 0x00000020, /* (macOS Only) Page invalidation allowed by
2189  task port policy */
2190 
2191  CS_HARD = 0x00000100, /* don't load invalid pages */
2192  CS_KILL = 0x00000200, /* kill process if it becomes invalid */
2193  CS_CHECK_EXPIRATION = 0x00000400, /* force expiration checking */
2194  CS_RESTRICT = 0x00000800, /* tell dyld to treat restricted */
2195 
2196  CS_ENFORCEMENT = 0x00001000, /* require enforcement */
2197  CS_REQUIRE_LV = 0x00002000, /* require library validation */
2199  0x00004000, /* code signature permits restricted entitlements */
2201  0x00008000, /* has com.apple.rootless.restricted-nvram-variables.heritable
2202  entitlement */
2203 
2204  CS_RUNTIME = 0x00010000, /* Apply hardened runtime policies */
2205  CS_LINKER_SIGNED = 0x00020000, /* Automatically signed by the linker */
2206 
2210 
2211  CS_EXEC_SET_HARD = 0x00100000, /* set CS_HARD on any exec'ed process */
2212  CS_EXEC_SET_KILL = 0x00200000, /* set CS_KILL on any exec'ed process */
2214  0x00400000, /* set CS_ENFORCEMENT on any exec'ed process */
2216  0x00800000, /* set CS_INSTALLER on any exec'ed process */
2217 
2218  CS_KILLED = 0x01000000, /* was killed by kernel for invalidity */
2220  0x02000000, /* dyld used to load this is a platform binary */
2221  CS_PLATFORM_BINARY = 0x04000000, /* this is a platform binary */
2223  0x08000000, /* platform binary by the fact of path (osx only) */
2224 
2225  CS_DEBUGGED = 0x10000000, /* process is currently or has previously been
2226  debugged and allowed to run with invalid pages */
2227  CS_SIGNED = 0x20000000, /* process has a signature (may have gone invalid) */
2229  0x40000000, /* code is dev signed, cannot be loaded into prod signed code
2230  (will go away with rdar://problem/28322552) */
2232  0x80000000, /* has Data Vault controller entitlement */
2233 
2236 };
2237 
2238 /* executable segment flags */
2239 
2241 
2242  CS_EXECSEG_MAIN_BINARY = 0x1, /* executable segment denotes main binary */
2243  CS_EXECSEG_ALLOW_UNSIGNED = 0x10, /* allow unsigned pages (for debugging) */
2244  CS_EXECSEG_DEBUGGER = 0x20, /* main binary is debugger */
2245  CS_EXECSEG_JIT = 0x40, /* JIT enabled */
2246  CS_EXECSEG_SKIP_LV = 0x80, /* OBSOLETE: skip library validation */
2247  CS_EXECSEG_CAN_LOAD_CDHASH = 0x100, /* can bless cdhash for execution */
2248  CS_EXECSEG_CAN_EXEC_CDHASH = 0x200, /* can execute blessed cdhash */
2249 
2250 };
2251 
2252 /* Magic numbers used by Code Signing */
2253 
2255  CSMAGIC_REQUIREMENT = 0xfade0c00, /* single Requirement blob */
2257  0xfade0c01, /* Requirements vector (internal requirements) */
2258  CSMAGIC_CODEDIRECTORY = 0xfade0c02, /* CodeDirectory blob */
2259  CSMAGIC_EMBEDDED_SIGNATURE = 0xfade0cc0, /* embedded form of signature data */
2260  CSMAGIC_EMBEDDED_SIGNATURE_OLD = 0xfade0b02, /* XXX */
2261  CSMAGIC_EMBEDDED_ENTITLEMENTS = 0xfade7171, /* embedded entitlements */
2263  0xfade0cc1, /* multi-arch collection of embedded signatures */
2264  CSMAGIC_BLOBWRAPPER = 0xfade0b01, /* CMS Signature, among other things */
2265 
2272 
2273  CSSLOT_CODEDIRECTORY = 0, /* slot index for CodeDirectory */
2279 
2281  0x1000, /* first alternate CodeDirectory, if any */
2282  CSSLOT_ALTERNATE_CODEDIRECTORY_MAX = 5, /* max number of alternate CD slots */
2285  CSSLOT_ALTERNATE_CODEDIRECTORY_MAX, /* one past the last */
2286 
2287  CSSLOT_SIGNATURESLOT = 0x10000, /* CMS Signature */
2290 
2291  CSTYPE_INDEX_REQUIREMENTS = 0x00000002, /* compat with amfi */
2292  CSTYPE_INDEX_ENTITLEMENTS = 0x00000005, /* compat with amfi */
2293 
2298 
2302 
2303  CS_CDHASH_LEN = 20, /* always - larger hashes are truncated */
2304  CS_HASH_MAX_SIZE = 48, /* max size of the hash we'll support */
2305 
2306  /*
2307  * Currently only to support Legacy VPN plugins, and Mac App Store
2308  * but intended to replace all the various platform code, dev code etc. bits.
2309  */
2313 
2317 };
2318 
2320  uint32_t magic; /* magic number (CSMAGIC_CODEDIRECTORY) */
2321  uint32_t length; /* total length of CodeDirectory blob */
2322  uint32_t version; /* compatibility version */
2323  uint32_t flags; /* setup and mode flags */
2324  uint32_t hashOffset; /* offset of hash slot element at index zero */
2325  uint32_t identOffset; /* offset of identifier string */
2326  uint32_t nSpecialSlots; /* number of special hash slots */
2327  uint32_t nCodeSlots; /* number of ordinary (code) hash slots */
2328  uint32_t codeLimit; /* limit to main image signature range */
2329  uint8_t hashSize; /* size of each hash in bytes */
2330  uint8_t hashType; /* type of hash (cdHashType* constants) */
2331  uint8_t platform; /* platform identifier; zero if not platform binary */
2332  uint8_t pageSize; /* log2(page size in bytes); 0 => infinite */
2333  uint32_t spare2; /* unused (must be zero) */
2334 
2335  /* Version 0x20100 */
2336  uint32_t scatterOffset; /* offset of optional scatter vector */
2337 
2338  /* Version 0x20200 */
2339  uint32_t teamOffset; /* offset of optional team identifier */
2340 
2341  /* Version 0x20300 */
2342  uint32_t spare3; /* unused (must be zero) */
2343  uint64_t codeLimit64; /* limit to main image signature range, 64 bits */
2344 
2345  /* Version 0x20400 */
2346  uint64_t execSegBase; /* offset of executable segment */
2347  uint64_t execSegLimit; /* limit of executable segment */
2348  uint64_t execSegFlags; /* executable segment flags */
2349 };
2350 
2351 static_assert(sizeof(CS_CodeDirectory) == 88);
2352 
2354  uint32_t type; /* type of entry */
2355  uint32_t offset; /* offset of entry */
2356 };
2357 
2359  uint32_t magic; /* magic number */
2360  uint32_t length; /* total length of SuperBlob */
2361  uint32_t count; /* number of index entries following */
2362  /* followed by Blobs in no particular order as indicated by index offsets */
2363 };
2364 
2366  kSecCodeSignatureNoHash = 0, /* null value */
2367  kSecCodeSignatureHashSHA1 = 1, /* SHA-1 */
2368  kSecCodeSignatureHashSHA256 = 2, /* SHA-256 */
2370  3, /* SHA-256 truncated to first 20 bytes */
2371  kSecCodeSignatureHashSHA384 = 4, /* SHA-384 */
2372  kSecCodeSignatureHashSHA512 = 5, /* SHA-512 */
2373 };
2374 
2384 };
2385 
2386 } // end namespace MachO
2387 } // end namespace llvm
2388 
2389 #endif
llvm::MachO::dylib
Definition: MachO.h:617
llvm::MachO::S_CSTRING_LITERALS
@ S_CSTRING_LITERALS
S_CSTRING_LITERALS - Section with literal C strings.
Definition: MachO.h:131
llvm::MachO::segment_command_64::flags
uint32_t flags
Definition: MachO.h:567
llvm::MachO::CSMAGIC_CODEDIRECTORY
@ CSMAGIC_CODEDIRECTORY
Definition: MachO.h:2258
llvm::MachO::build_tool_version::tool
uint32_t tool
Definition: MachO.h:858
llvm::MachO::CS_SUPPL_SIGNER_TYPE_UNKNOWN
@ CS_SUPPL_SIGNER_TYPE_UNKNOWN
Definition: MachO.h:2314
llvm::MachO::CS_INVALID_ALLOWED
@ CS_INVALID_ALLOWED
Definition: MachO.h:2188
llvm::MachO::tlv_descriptor_32::thunk
uint32_t thunk
Definition: MachO.h:930
i
i
Definition: README.txt:29
llvm::MachO::sub_library_command
Definition: MachO.h:648
llvm::MachO::segment_command_64::initprot
uint32_t initprot
Definition: MachO.h:565
llvm::MachO::PPC_THREAD_STATE_COUNT
const uint32_t PPC_THREAD_STATE_COUNT
Definition: MachO.h:2140
llvm::MachO::ARM64_RELOC_TLVP_LOAD_PAGEOFF12
@ ARM64_RELOC_TLVP_LOAD_PAGEOFF12
Definition: MachO.h:473
llvm::MachO::CS_HASH_MAX_SIZE
@ CS_HASH_MAX_SIZE
Definition: MachO.h:2304
llvm::MachO::encryption_info_command::cryptoff
uint32_t cryptoff
Definition: MachO.h:827
llvm::MachO::fat_arch_64::offset
uint64_t offset
Definition: MachO.h:971
llvm::MachO::version_min_command::sdk
uint32_t sdk
Definition: MachO.h:846
llvm::MachO::CPU_SUBTYPE_ARM_V5
@ CPU_SUBTYPE_ARM_V5
Definition: MachO.h:1626
llvm::MachO::BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
@ BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
Definition: MachO.h:277
llvm::MachO::S_ATTR_SOME_INSTRUCTIONS
@ S_ATTR_SOME_INSTRUCTIONS
S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.
Definition: MachO.h:213
llvm::MachO::x86_thread_state32_t
Definition: MachO.h:1670
llvm::MachO::CPUSubTypeX86
CPUSubTypeX86
Definition: MachO.h:1585
llvm::MachO::dysymtab_command::nextrel
uint32_t nextrel
Definition: MachO.h:727
LLVM_PACKED_END
#define LLVM_PACKED_END
Definition: Compiler.h:386
llvm::MachO::CS_FORCED_LV
@ CS_FORCED_LV
Definition: MachO.h:2186
llvm::MachO::TOOL_LD
@ TOOL_LD
Definition: MachO.h:512
llvm::MachO::REFERENCE_FLAG_UNDEFINED_NON_LAZY
@ REFERENCE_FLAG_UNDEFINED_NON_LAZY
Definition: MachO.h:335
llvm::MachO::S_ATTR_NO_DEAD_STRIP
@ S_ATTR_NO_DEAD_STRIP
S_ATTR_NO_DEAD_STRIP - No dead stripping.
Definition: MachO.h:200
llvm::MachO::sub_umbrella_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:644
llvm::MachO::PPC_RELOC_SECTDIFF
@ PPC_RELOC_SECTDIFF
Definition: MachO.h:427
llvm::MachO::fat_arch_64::reserved
uint32_t reserved
Definition: MachO.h:974
llvm::MachO::dyld_chained_starts_in_image::seg_count
uint32_t seg_count
Definition: MachO.h:1077
llvm::MachO::section
Definition: MachO.h:570
llvm::MachO::arm_thread_state64_t::cpsr
uint32_t cpsr
Definition: MachO.h:1968
llvm::MachO::CSSLOT_ALTERNATE_CODEDIRECTORY_MAX
@ CSSLOT_ALTERNATE_CODEDIRECTORY_MAX
Definition: MachO.h:2282
llvm::MachO::ARM64_RELOC_UNSIGNED
@ ARM64_RELOC_UNSIGNED
Definition: MachO.h:455
llvm::MachO::mach_header::magic
uint32_t magic
Definition: MachO.h:517
llvm::MachO::dylib::compatibility_version
uint32_t compatibility_version
Definition: MachO.h:621
llvm::MachO::x86_DEBUG_STATE64
@ x86_DEBUG_STATE64
Definition: MachO.h:1906
llvm::MachO::CS_DATAVAULT_CONTROLLER
@ CS_DATAVAULT_CONTROLLER
Definition: MachO.h:2231
llvm::MachO::PLATFORM_MACOS
@ PLATFORM_MACOS
Definition: MachO.h:499
llvm::MachO::scattered_relocation_info::r_pcrel
uint32_t r_pcrel
Definition: MachO.h:989
llvm::MachO::CPU_SUBTYPE_X86_ALL
@ CPU_SUBTYPE_X86_ALL
Definition: MachO.h:1608
llvm::MachO::fileset_entry_command
Definition: MachO.h:899
llvm::MachO::thread_command::cmd
uint32_t cmd
Definition: MachO.h:670
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MachO::PLATFORM_WATCHOSSIMULATOR
@ PLATFORM_WATCHOSSIMULATOR
Definition: MachO.h:507
llvm::MachO::CS_SIGNER_TYPE_UNKNOWN
@ CS_SIGNER_TYPE_UNKNOWN
Definition: MachO.h:2310
llvm::MachO::FAT_CIGAM
@ FAT_CIGAM
Definition: MachO.h:35
llvm::MachO::scattered_relocation_info::r_type
uint32_t r_type
Definition: MachO.h:989
llvm::MachO::CS_CodeDirectory::execSegLimit
uint64_t execSegLimit
Definition: MachO.h:2347
llvm::MachO::prebound_dylib_command::name
uint32_t name
Definition: MachO.h:658
llvm::MachO::MH_BUNDLE
@ MH_BUNDLE
Definition: MachO.h:50
llvm::MachO::any_relocation_info
Definition: MachO.h:996
llvm::MachO::tlv_descriptor_32::offset
uint32_t offset
Definition: MachO.h:932
llvm::MachO::symseg_command::cmd
uint32_t cmd
Definition: MachO.h:909
llvm::MachO::routines_command_64::reserved5
uint64_t reserved5
Definition: MachO.h:696
llvm::MachO::BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
@ BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
Definition: MachO.h:287
llvm::MachO::routines_command_64::init_address
uint64_t init_address
Definition: MachO.h:690
llvm::MachO::EXECUTABLE_ORDINAL
@ EXECUTABLE_ORDINAL
Definition: MachO.h:355
llvm::MachO::relocation_info::r_length
uint32_t r_length
Definition: MachO.h:980
llvm::MachO::LOH_ARM64_ADRP_ADD
@ LOH_ARM64_ADRP_ADD
Definition: MachO.h:2382
llvm::MachO::tlv_descriptor_64::thunk
uint64_t thunk
Definition: MachO.h:936
llvm::MachO::encryption_info_command::cryptsize
uint32_t cryptsize
Definition: MachO.h:828
llvm::MachO::source_version_command::version
uint64_t version
Definition: MachO.h:821
llvm::MachO::dylib_module_64::ilocalsym
uint32_t ilocalsym
Definition: MachO.h:759
LLVM_PACKED_START
#define LLVM_PACKED_START
Definition: Compiler.h:385
llvm::MachO::uuid_command::cmd
uint32_t cmd
Definition: MachO.h:794
llvm::MachO::sub_umbrella_command
Definition: MachO.h:642
llvm::MachO::data_in_code_entry::length
uint16_t length
Definition: MachO.h:814
llvm::MachO::data_in_code_entry::kind
uint16_t kind
Definition: MachO.h:815
llvm::MachO::x86_float_state64_t::fpu_fop
uint16_t fpu_fop
Definition: MachO.h:1752
llvm::MachO::dyld_chained_ptr_64_rebase::reserved
uint64_t reserved
Definition: MachO.h:1132
llvm::MachO::x86_exception_state_t::es64
x86_exception_state64_t es64
Definition: MachO.h:1886
llvm::MachO::dyld_chained_ptr_64_bind::ordinal
uint64_t ordinal
Definition: MachO.h:1121
llvm::MachO::fp_control_t::denorm
unsigned short denorm
Definition: MachO.h:1727
llvm::MachO::CS_EXECSEG_MAIN_BINARY
@ CS_EXECSEG_MAIN_BINARY
Definition: MachO.h:2242
llvm::MachO::x86_float_state64_t::fpu_fsw
fp_status_t fpu_fsw
Definition: MachO.h:1749
llvm::MachO::VM_PROT_EXECUTE
@ VM_PROT_EXECUTE
Definition: MachO.h:494
llvm::sys::swapByteOrder
void swapByteOrder(T &Value)
Definition: SwapByteOrder.h:158
llvm::MachO::kSecCodeSignatureHashSHA512
@ kSecCodeSignatureHashSHA512
Definition: MachO.h:2372
llvm::MachO::CS_SUPPORTSSCATTER
@ CS_SUPPORTSSCATTER
Definition: MachO.h:2266
llvm::MachO::CPU_SUBTYPE_LIB64
@ CPU_SUBTYPE_LIB64
Definition: MachO.h:1578
llvm::MachO::PPC_RELOC_HA16
@ PPC_RELOC_HA16
Definition: MachO.h:425
llvm::MachO::dylib_module::iextrel
uint32_t iextrel
Definition: MachO.h:745
llvm::MachO::encryption_info_command_64::cmdsize
uint32_t cmdsize
Definition: MachO.h:834
llvm::MachO::mach_header_64::flags
uint32_t flags
Definition: MachO.h:533
llvm::MachO::sub_umbrella_command::sub_umbrella
uint32_t sub_umbrella
Definition: MachO.h:645
llvm::MachO::section_64::sectname
char sectname[16]
Definition: MachO.h:585
llvm::MachO::tlv_descriptor::offset
uintptr_t offset
Definition: MachO.h:944
llvm::MachO::ppc_thread_state32_t::r31
uint32_t r31
Definition: MachO.h:2055
llvm::MachO::dylib_module_64
Definition: MachO.h:753
llvm::MachO::mach_header::ncmds
uint32_t ncmds
Definition: MachO.h:521
llvm::MachO::fat_header::nfat_arch
uint32_t nfat_arch
Definition: MachO.h:957
llvm::MachO::fat_arch_64::align
uint32_t align
Definition: MachO.h:973
llvm::MachO::ppc_thread_state_t::tsh
ppc_state_hdr_t tsh
Definition: MachO.h:2113
llvm::MachO::EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE
@ EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE
Definition: MachO.h:301
llvm::MachO::N_LBRAC
@ N_LBRAC
Definition: MachO.h:385
llvm::MachO::rpath_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:801
llvm::MachO::CS_HASHTYPE_SHA384
@ CS_HASHTYPE_SHA384
Definition: MachO.h:2297
llvm::MachO::N_VERSION
@ N_VERSION
Definition: MachO.h:380
llvm::MachO::CS_CodeDirectory::length
uint32_t length
Definition: MachO.h:2321
llvm::MachO::symtab_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:702
llvm::MachO::dyld_chained_starts_in_segment::segment_offset
uint64_t segment_offset
VM offset from the __TEXT segment.
Definition: MachO.h:1085
llvm::MachO::CS_PLATFORM_BINARY
@ CS_PLATFORM_BINARY
Definition: MachO.h:2221
llvm::MachO::ARM_RELOC_SECTDIFF
@ ARM_RELOC_SECTDIFF
Definition: MachO.h:441
llvm::MachO::nlist
Definition: MachO.h:1008
llvm::MachO::DYLD_CHAINED_SYMBOL_UNCOMPRESSED
@ DYLD_CHAINED_SYMBOL_UNCOMPRESSED
Definition: MachO.h:1033
llvm::MachO::CPU_SUBTYPE_POWERPC_603ev
@ CPU_SUBTYPE_POWERPC_603ev
Definition: MachO.h:1654
llvm::MachO::MH_ALLMODSBOUND
@ MH_ALLMODSBOUND
Definition: MachO.h:72
llvm::MachO::N_EXT
@ N_EXT
Definition: MachO.h:310
llvm::MachO::symtab_command::strsize
uint32_t strsize
Definition: MachO.h:706
llvm::MachO::segment_command_64::nsects
uint32_t nsects
Definition: MachO.h:566
llvm::MachO::fat_arch::align
uint32_t align
Definition: MachO.h:965
llvm::MachO::x86_float_state64_t::fpu_xmm5
xmm_reg_t fpu_xmm5
Definition: MachO.h:1774
llvm::MachO::GENERIC_RELOC_SECTDIFF
@ GENERIC_RELOC_SECTDIFF
Definition: MachO.h:411
llvm::MachO::BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
@ BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
Definition: MachO.h:283
llvm::MachO::kSecCodeSignatureHashSHA384
@ kSecCodeSignatureHashSHA384
Definition: MachO.h:2371
llvm::MachO::PPC_EXCEPTION_STATE
@ PPC_EXCEPTION_STATE
Definition: MachO.h:2127
llvm::MachO::fat_arch_64::size
uint64_t size
Definition: MachO.h:972
llvm::MachO::CPU_ARCH_MASK
@ CPU_ARCH_MASK
Definition: MachO.h:1554
llvm::MachO::CS_HASHTYPE_SHA256_TRUNCATED
@ CS_HASHTYPE_SHA256_TRUNCATED
Definition: MachO.h:2296
llvm::MachO::MH_FILESET
@ MH_FILESET
Definition: MachO.h:54
llvm::MachO::fvmlib::header_addr
uint32_t header_addr
Definition: MachO.h:607
llvm::MachO::REBASE_OPCODE_SET_TYPE_IMM
@ REBASE_OPCODE_SET_TYPE_IMM
Definition: MachO.h:244
llvm::MachO::ARM64_RELOC_BRANCH26
@ ARM64_RELOC_BRANCH26
Definition: MachO.h:459
llvm::MachO::section::offset
uint32_t offset
Definition: MachO.h:575
llvm::MachO::routines_command_64::cmd
uint32_t cmd
Definition: MachO.h:688
llvm::MachO::fp_status_t::precis
unsigned short precis
Definition: MachO.h:1733
llvm::MachO::CS_DEBUGGED
@ CS_DEBUGGED
Definition: MachO.h:2225
llvm::MachO::CPU_SUBTYPE_ARM_V7M
@ CPU_SUBTYPE_ARM_V7M
Definition: MachO.h:1634
llvm::MachO::mach_header::cpusubtype
uint32_t cpusubtype
Definition: MachO.h:519
llvm::MachO::MH_NOUNDEFS
@ MH_NOUNDEFS
Definition: MachO.h:60
llvm::MachO::dylib_module::iinit_iterm
uint32_t iinit_iterm
Definition: MachO.h:747
llvm::MachO::CodeSignMagic
CodeSignMagic
Definition: MachO.h:2254
llvm::MachO::dylib_module_64::iextrel
uint32_t iextrel
Definition: MachO.h:761
llvm::MachO::encryption_info_command_64::cryptid
uint32_t cryptid
Definition: MachO.h:837
llvm::MachO::fp_control_t::pc
unsigned short pc
Definition: MachO.h:1728
llvm::MachO::CS_VALID
@ CS_VALID
Definition: MachO.h:2181
llvm::MachO::x86_float_state64_t::fpu_stmm0
mmst_reg_t fpu_stmm0
Definition: MachO.h:1761
llvm::MachO::CPU_SUBTYPE_PENTII_M5
@ CPU_SUBTYPE_PENTII_M5
Definition: MachO.h:1594
llvm::MachO::ppc_thread_state32_t::r10
uint32_t r10
Definition: MachO.h:2034
llvm::MachO::CSSLOT_INFOSLOT
@ CSSLOT_INFOSLOT
Definition: MachO.h:2274
llvm::MachO::X86_64_RELOC_SIGNED_4
@ X86_64_RELOC_SIGNED_4
Definition: MachO.h:488
llvm::MachO::S_ATTR_NO_TOC
@ S_ATTR_NO_TOC
S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be in a ranlib table of contents.
Definition: MachO.h:195
llvm::MachO::ARM_EXCEPTION_STATE
@ ARM_EXCEPTION_STATE
Definition: MachO.h:2002
llvm::MachO::x86_EXCEPTION_STATE64_COUNT
const uint32_t x86_EXCEPTION_STATE64_COUNT
Definition: MachO.h:1935
llvm::MachO::CS_CodeDirectory::nSpecialSlots
uint32_t nSpecialSlots
Definition: MachO.h:2326
llvm::MachO::N_PC
@ N_PC
Definition: MachO.h:367
llvm::MachO::entry_point_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:949
llvm::MachO::CPU_SUBTYPE_PENTIUM_M
@ CPU_SUBTYPE_PENTIUM_M
Definition: MachO.h:1600
llvm::MachO::x86_float_state64_t::fpu_rsrv4
char fpu_rsrv4[6 *16]
Definition: MachO.h:1785
llvm::MachO::CPU_ARCH_ABI64_32
@ CPU_ARCH_ABI64_32
Definition: MachO.h:1556
llvm::MachO::ppc_thread_state32_t::r7
uint32_t r7
Definition: MachO.h:2031
llvm::MachO::x86_exception_state64_t::trapno
uint16_t trapno
Definition: MachO.h:1790
llvm::MachO::MH_EXECUTE
@ MH_EXECUTE
Definition: MachO.h:44
llvm::MachO::LOH_ARM64_ADRP_LDR_GOT_STR
@ LOH_ARM64_ADRP_LDR_GOT_STR
Definition: MachO.h:2381
llvm::MachO::CS_CodeDirectory::hashSize
uint8_t hashSize
Definition: MachO.h:2329
llvm::MachO::dysymtab_command::indirectsymoff
uint32_t indirectsymoff
Definition: MachO.h:724
llvm::MachO::ARM64_RELOC_ADDEND
@ ARM64_RELOC_ADDEND
Definition: MachO.h:475
llvm::MachO::entry_point_command::cmd
uint32_t cmd
Definition: MachO.h:948
llvm::MachO::segment_command::filesize
uint32_t filesize
Definition: MachO.h:549
llvm::MachO::rpath_command
Definition: MachO.h:799
llvm::MachO::ppc_thread_state32_t::r6
uint32_t r6
Definition: MachO.h:2030
llvm::MachO::N_GSYM
@ N_GSYM
Definition: MachO.h:361
llvm::MachO::dyld_chained_ptr_64_rebase
Definition: MachO.h:1129
llvm::MachO::relocation_info::r_address
int32_t r_address
Definition: MachO.h:979
Error.h
llvm::MachO::REBASE_TYPE_POINTER
@ REBASE_TYPE_POINTER
Definition: MachO.h:235
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
SwapByteOrder.h
llvm::MachO::PLATFORM_IOS
@ PLATFORM_IOS
Definition: MachO.h:500
llvm::MachO::N_ENSYM
@ N_ENSYM
Definition: MachO.h:372
llvm::MachO::ARM_RELOC_LOCAL_SECTDIFF
@ ARM_RELOC_LOCAL_SECTDIFF
Definition: MachO.h:442
llvm::MachO::section_64::addr
uint64_t addr
Definition: MachO.h:587
llvm::MachO::sub_framework_command
Definition: MachO.h:630
llvm::MachO::CPU_TYPE_ARM
@ CPU_TYPE_ARM
Definition: MachO.h:1567
llvm::MachO::data_in_code_entry::offset
uint32_t offset
Definition: MachO.h:813
llvm::MachO::SET_LIBRARY_ORDINAL
void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal)
Definition: MachO.h:1539
llvm::MachO::ppc_thread_state32_t::mq
uint32_t mq
Definition: MachO.h:2060
llvm::MachO::S_LITERAL_POINTERS
@ S_LITERAL_POINTERS
S_LITERAL_POINTERS - Section with pointers to literals.
Definition: MachO.h:137
llvm::MachO::DICE_KIND_JUMP_TABLE8
@ DICE_KIND_JUMP_TABLE8
Definition: MachO.h:228
llvm::MachO::nlist_64::n_strx
uint32_t n_strx
Definition: MachO.h:1017
llvm::MachO::x86_float_state64_t::fpu_ftw
uint8_t fpu_ftw
Definition: MachO.h:1750
llvm::MachO::ppc_thread_state32_t::r5
uint32_t r5
Definition: MachO.h:2029
llvm::MachO::dylib_module::module_name
uint32_t module_name
Definition: MachO.h:738
llvm::MachO::REBASE_OPCODE_ADD_ADDR_ULEB
@ REBASE_OPCODE_ADD_ADDR_ULEB
Definition: MachO.h:246
llvm::MachO::FAT_MAGIC_64
@ FAT_MAGIC_64
Definition: MachO.h:36
llvm::MachO::arm_thread_state_t::ts32
arm_thread_state32_t ts32
Definition: MachO.h:1990
llvm::MachO::dyld_chained_ptr_64_bind::reserved
uint64_t reserved
Definition: MachO.h:1123
llvm::MachO::CS_EXECSEG_JIT
@ CS_EXECSEG_JIT
Definition: MachO.h:2245
llvm::MachO::arm_thread_state64_t::sp
uint64_t sp
Definition: MachO.h:1966
llvm::MachO::CSSLOT_TICKETSLOT
@ CSSLOT_TICKETSLOT
Definition: MachO.h:2289
llvm::MachO::dylib::name
uint32_t name
Definition: MachO.h:618
llvm::MachO::BIND_SPECIAL_DYLIB_WEAK_LOOKUP
@ BIND_SPECIAL_DYLIB_WEAK_LOOKUP
Definition: MachO.h:264
llvm::MachO::segment_command::fileoff
uint32_t fileoff
Definition: MachO.h:548
llvm::MachO::x86_float_state64_t::fpu_stmm3
mmst_reg_t fpu_stmm3
Definition: MachO.h:1764
llvm::MachO::sub_library_command::cmd
uint32_t cmd
Definition: MachO.h:649
llvm::MachO::PLATFORM_MACCATALYST
@ PLATFORM_MACCATALYST
Definition: MachO.h:504
llvm::MachO::segment_command_64::cmd
uint32_t cmd
Definition: MachO.h:557
llvm::MachO::symtab_command
Definition: MachO.h:700
llvm::MachO::S_GB_ZEROFILL
@ S_GB_ZEROFILL
S_GB_ZEROFILL - Zero fill on demand section (that can be larger than 4 gigabytes).
Definition: MachO.h:155
llvm::MachO::SG_READ_ONLY
@ SG_READ_ONLY
Definition: MachO.h:110
llvm::MachO::MH_TWOLEVEL
@ MH_TWOLEVEL
Definition: MachO.h:67
llvm::MachO::segment_command::vmsize
uint32_t vmsize
Definition: MachO.h:547
llvm::MachO::FAT_MAGIC
@ FAT_MAGIC
Definition: MachO.h:34
llvm::MachO::CS_EXEC_INHERIT_SIP
@ CS_EXEC_INHERIT_SIP
Definition: MachO.h:2215
llvm::MachO::GET_COMM_ALIGN
uint8_t GET_COMM_ALIGN(uint16_t n_desc)
Definition: MachO.h:1543
llvm::MachO::fvmlib
Definition: MachO.h:604
llvm::MachO::build_version_command
Definition: MachO.h:862
llvm::MachO::DICE_KIND_DATA
@ DICE_KIND_DATA
Definition: MachO.h:227
llvm::MachO::EXPORT_SYMBOL_FLAGS_KIND_MASK
@ EXPORT_SYMBOL_FLAGS_KIND_MASK
Definition: MachO.h:292
llvm::MachO::CS_ENTITLEMENTS_VALIDATED
@ CS_ENTITLEMENTS_VALIDATED
Definition: MachO.h:2198
llvm::MachO::x86_EXCEPTION_STATE
@ x86_EXCEPTION_STATE
Definition: MachO.h:1904
llvm::MachO::ppc_thread_state32_t::ct
uint32_t ct
Definition: MachO.h:2056
llvm::MachO::section::segname
char segname[16]
Definition: MachO.h:572
llvm::MachO::CS_CodeDirectory::execSegBase
uint64_t execSegBase
Definition: MachO.h:2346
llvm::MachO::MH_ALLOW_STACK_EXECUTION
@ MH_ALLOW_STACK_EXECUTION
Definition: MachO.h:77
llvm::MachO::prebind_cksum_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:789
llvm::MachO::DICE_KIND_JUMP_TABLE16
@ DICE_KIND_JUMP_TABLE16
Definition: MachO.h:229
llvm::MachO::REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
@ REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
Definition: MachO.h:245
llvm::MachO::x86_thread_state64_t::rax
uint64_t rax
Definition: MachO.h:1690
llvm::MachO::mmst_reg_t::mmst_reg
char mmst_reg[10]
Definition: MachO.h:1738
llvm::MachO::CSSLOT_ENTITLEMENTS
@ CSSLOT_ENTITLEMENTS
Definition: MachO.h:2278
llvm::MachO::PPC_RELOC_BR14
@ PPC_RELOC_BR14
Definition: MachO.h:421
llvm::MachO::REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY
@ REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY
Definition: MachO.h:340
llvm::MachO::CPUType
CPUType
Definition: MachO.h:1560
llvm::MachO::dysymtab_command::tocoff
uint32_t tocoff
Definition: MachO.h:718
llvm::MachO::dyld_chained_import
Definition: MachO.h:1093
llvm::MachO::dyld_chained_starts_in_image
dyld_chained_starts_in_image is embedded in LC_DYLD_CHAINED_FIXUPS payload.
Definition: MachO.h:1076
llvm::MachO::dyld_chained_starts_in_segment
Definition: MachO.h:1081
llvm::MachO::x86_float_state64_t::fpu_xmm9
xmm_reg_t fpu_xmm9
Definition: MachO.h:1778
llvm::MachO::encryption_info_command_64::cmd
uint32_t cmd
Definition: MachO.h:833
llvm::MachO::S_ATTR_STRIP_STATIC_SYMS
@ S_ATTR_STRIP_STATIC_SYMS
S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section in files with the MY_DYLDLINK f...
Definition: MachO.h:198
llvm::MachO::CS_SIGNER_TYPE_MAC_APP_STORE
@ CS_SIGNER_TYPE_MAC_APP_STORE
Definition: MachO.h:2312
llvm::MachO::isVirtualSection
bool isVirtualSection(uint8_t type)
Definition: MachO.h:599
llvm::MachO::rpath_command::path
uint32_t path
Definition: MachO.h:802
llvm::MachO::ARM_RELOC_PB_LA_PTR
@ ARM_RELOC_PB_LA_PTR
Definition: MachO.h:443
llvm::MachO::CPU_SUBTYPE_PENT
@ CPU_SUBTYPE_PENT
Definition: MachO.h:1591
llvm::MachO::load_command::cmd
uint32_t cmd
Definition: MachO.h:538
llvm::MachO::CS_SUPPORTSTEAMID
@ CS_SUPPORTSTEAMID
Definition: MachO.h:2267
llvm::MachO::LoadCommandType
LoadCommandType
Definition: MachO.h:98
llvm::MachO::x86_thread_state64_t::r14
uint64_t r14
Definition: MachO.h:1704
llvm::MachO::sub_framework_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:632
llvm::MachO::N_WEAK_DEF
@ N_WEAK_DEF
Definition: MachO.h:346
llvm::MachO::dyld_info_command::export_off
uint32_t export_off
Definition: MachO.h:889
llvm::MachO::CodeSignExecSegFlags
CodeSignExecSegFlags
Definition: MachO.h:2240
llvm::MachO::fileset_entry_command::vmaddr
uint64_t vmaddr
Definition: MachO.h:902
llvm::MachO::MH_DEAD_STRIPPABLE_DYLIB
@ MH_DEAD_STRIPPABLE_DYLIB
Definition: MachO.h:82
llvm::MachO::S_ZEROFILL
@ S_ZEROFILL
S_ZEROFILL - Zero fill on demand section.
Definition: MachO.h:129
llvm::MachO::CS_EXECSEG_CAN_LOAD_CDHASH
@ CS_EXECSEG_CAN_LOAD_CDHASH
Definition: MachO.h:2247
llvm::MachO::fvmlib::minor_version
uint32_t minor_version
Definition: MachO.h:606
llvm::MachO::PPC_RELOC_LO16
@ PPC_RELOC_LO16
Definition: MachO.h:424
llvm::MachO::CS_CodeDirectory::flags
uint32_t flags
Definition: MachO.h:2323
llvm::MachO::MH_APP_EXTENSION_SAFE
@ MH_APP_EXTENSION_SAFE
Definition: MachO.h:85
llvm::MachO::x86_thread_state32_t::es
uint32_t es
Definition: MachO.h:1684
llvm::MachO::tlv_descriptor::thunk
uintptr_t thunk
Definition: MachO.h:942
llvm::MachO::MH_PREBINDABLE
@ MH_PREBINDABLE
Definition: MachO.h:71
llvm::MachO::dysymtab_command::nindirectsyms
uint32_t nindirectsyms
Definition: MachO.h:725
llvm::MachO::dylib_module::iextdefsym
uint32_t iextdefsym
Definition: MachO.h:739
llvm::MachO::section::size
uint32_t size
Definition: MachO.h:574
llvm::MachO::dyld_env_command::cmd
uint32_t cmd
Definition: MachO.h:873
llvm::MachO::dylib_module_64::iextdefsym
uint32_t iextdefsym
Definition: MachO.h:755
llvm::MachO::nlist::n_sect
uint8_t n_sect
Definition: MachO.h:1011
llvm::MachO::ppc_thread_state32_t::r28
uint32_t r28
Definition: MachO.h:2052
llvm::MachO::MH_NO_REEXPORTED_DYLIBS
@ MH_NO_REEXPORTED_DYLIBS
Definition: MachO.h:80
llvm::MachO::mach_header_64::ncmds
uint32_t ncmds
Definition: MachO.h:531
llvm::MachO::CPU_SUBTYPE_POWERPC_7450
@ CPU_SUBTYPE_POWERPC_7450
Definition: MachO.h:1660
llvm::MachO::section_64::offset
uint32_t offset
Definition: MachO.h:589
llvm::MachO::ExportSymbolKind
ExportSymbolKind
Definition: MachO.h:298
llvm::MachO::N_UNDF
@ N_UNDF
Definition: MachO.h:316
llvm::MachO::BindSpecialDylib
BindSpecialDylib
Definition: MachO.h:260
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::MachO::dyld_chained_ptr_64_rebase::high8
uint64_t high8
Definition: MachO.h:1131
llvm::MachO::x86_THREAD_STATE
@ x86_THREAD_STATE
Definition: MachO.h:1902
llvm::MachO::LOH_ARM64_ADRP_ADRP
@ LOH_ARM64_ADRP_ADRP
Definition: MachO.h:2376
llvm::MachO::CPU_SUBTYPE_PENTIUM_3
@ CPU_SUBTYPE_PENTIUM_3
Definition: MachO.h:1597
llvm::MachO::nlist::n_value
uint32_t n_value
Definition: MachO.h:1013
llvm::MachO::SECTION_TYPE
@ SECTION_TYPE
Definition: MachO.h:114
llvm::MachO::dyld_chained_fixups_header::fixups_version
uint32_t fixups_version
0
Definition: MachO.h:1064
llvm::MachO::prebound_dylib_command::cmd
uint32_t cmd
Definition: MachO.h:656
llvm::MachO::CPU_SUBTYPE_I386_ALL
@ CPU_SUBTYPE_I386_ALL
Definition: MachO.h:1586
llvm::MachO::dylib_module
Definition: MachO.h:737
llvm::MachO::CS_CodeDirectory::codeLimit64
uint64_t codeLimit64
Definition: MachO.h:2343
llvm::MachO::X86_64_RELOC_SIGNED_2
@ X86_64_RELOC_SIGNED_2
Definition: MachO.h:487
llvm::MachO::S_SYMBOL_STUBS
@ S_SYMBOL_STUBS
S_SYMBOL_STUBS - Section with symbol stubs, byte size of stub in the Reserved2 field.
Definition: MachO.h:144
llvm::MachO::S_8BYTE_LITERALS
@ S_8BYTE_LITERALS
S_8BYTE_LITERALS - Section with 8 byte literals.
Definition: MachO.h:135
llvm::MachO::x86_float_state64_t::fpu_xmm3
xmm_reg_t fpu_xmm3
Definition: MachO.h:1772
llvm::MachO::dyld_chained_fixups_header::imports_format
uint32_t imports_format
DYLD_CHAINED_IMPORT*.
Definition: MachO.h:1069
llvm::MachO::scattered_relocation_info::r_value
int32_t r_value
Definition: MachO.h:992
llvm::MachO::prebound_dylib_command
Definition: MachO.h:655
llvm::MachO::CPU_SUBTYPE_SPARC_ALL
@ CPU_SUBTYPE_SPARC_ALL
Definition: MachO.h:1646
llvm::MachO::note_command::cmd
uint32_t cmd
Definition: MachO.h:850
llvm::MachO::CPU_SUBTYPE_POWERPC_603
@ CPU_SUBTYPE_POWERPC_603
Definition: MachO.h:1652
llvm::MachO::build_version_command::sdk
uint32_t sdk
Definition: MachO.h:868
llvm::MachO::dyld_chained_import_addend
Definition: MachO.h:1100
llvm::MachO::tlv_descriptor_64
Definition: MachO.h:935
llvm::MachO::section_64::reserved2
uint32_t reserved2
Definition: MachO.h:595
llvm::MachO::arm_thread_state32_t::r
uint32_t r[13]
Definition: MachO.h:1946
llvm::MachO::dyld_env_command::name
uint32_t name
Definition: MachO.h:875
llvm::MachO::x86_thread_state32_t::eflags
uint32_t eflags
Definition: MachO.h:1680
llvm::MachO::build_tool_version::version
uint32_t version
Definition: MachO.h:859
llvm::MachO::CS_CodeDirectory::identOffset
uint32_t identOffset
Definition: MachO.h:2325
llvm::MachO::routines_command_64::reserved1
uint64_t reserved1
Definition: MachO.h:692
llvm::MachO::encryption_info_command_64::cryptoff
uint32_t cryptoff
Definition: MachO.h:835
llvm::MachO::ppc_thread_state32_t::r12
uint32_t r12
Definition: MachO.h:2036
llvm::MachO::fileset_entry_command::cmd
uint32_t cmd
Definition: MachO.h:900
llvm::MachO::x86_float_state64_t::fpu_xmm7
xmm_reg_t fpu_xmm7
Definition: MachO.h:1776
llvm::MachO::BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION
@ BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION
Definition: MachO.h:269
llvm::MachO::nlist_64::n_type
uint8_t n_type
Definition: MachO.h:1018
llvm::MachO::BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
@ BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
Definition: MachO.h:286
llvm::MachO::x86_float_state64_t::fpu_stmm7
mmst_reg_t fpu_stmm7
Definition: MachO.h:1768
llvm::MachO::arm_thread_state32_t::lr
uint32_t lr
Definition: MachO.h:1948
llvm::MachO::x86_float_state_t::ufs
union llvm::MachO::x86_float_state_t::@154 ufs
llvm::MachO::symtab_command::nsyms
uint32_t nsyms
Definition: MachO.h:704
llvm::MachO::S_MOD_TERM_FUNC_POINTERS
@ S_MOD_TERM_FUNC_POINTERS
S_MOD_TERM_FUNC_POINTERS - Section with only function pointers for termination.
Definition: MachO.h:150
llvm::MachO::CPU_TYPE_X86_64
@ CPU_TYPE_X86_64
Definition: MachO.h:1564
llvm::MachO::ident_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:918
llvm::MachO::MH_DYLIB_IN_CACHE
@ MH_DYLIB_IN_CACHE
Definition: MachO.h:88
llvm::MachO::CPU_SUBTYPE_POWERPC_604e
@ CPU_SUBTYPE_POWERPC_604e
Definition: MachO.h:1656
llvm::MachO::thread_command
Definition: MachO.h:669
llvm::MachO::x86_thread_state64_t::rdi
uint64_t rdi
Definition: MachO.h:1694
llvm::MachO::dylib_module::nextdefsym
uint32_t nextdefsym
Definition: MachO.h:740
llvm::MachO::thread_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:671
llvm::MachO::entry_point_command::stacksize
uint64_t stacksize
Definition: MachO.h:951
llvm::MachO::CS_CodeDirectory::scatterOffset
uint32_t scatterOffset
Definition: MachO.h:2336
llvm::MachO::getCPUType
Expected< uint32_t > getCPUType(const Triple &T)
Definition: MachO.cpp:77
llvm::MachO::fp_control_t::rc
unsigned short rc
Definition: MachO.h:1728
llvm::MachO::uuid_command
Definition: MachO.h:793
llvm::MachO::MH_NLIST_OUTOFSYNC_WITH_DYLDINFO
@ MH_NLIST_OUTOFSYNC_WITH_DYLDINFO
Definition: MachO.h:86
llvm::MachO::section::addr
uint32_t addr
Definition: MachO.h:573
llvm::MachO::PPC_RELOC_JBSR
@ PPC_RELOC_JBSR
Definition: MachO.h:432
llvm::MachO::uuid_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:795
llvm::MachO::ARM64_RELOC_SUBTRACTOR
@ ARM64_RELOC_SUBTRACTOR
Definition: MachO.h:457
llvm::MachO::fp_status_t::invalid
unsigned short invalid
Definition: MachO.h:1732
llvm::MachO::DYLD_CHAINED_PTR_ARM64E_USERLAND
@ DYLD_CHAINED_PTR_ARM64E_USERLAND
Definition: MachO.h:1054
llvm::MachO::StabType
StabType
Definition: MachO.h:358
llvm::MachO::x86_DEBUG_STATE
@ x86_DEBUG_STATE
Definition: MachO.h:1907
llvm::MachO::MH_NOFIXPREBINDING
@ MH_NOFIXPREBINDING
Definition: MachO.h:70
llvm::MachO::dyld_env_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:874
llvm::MachO::fvmfile_command::header_addr
uint32_t header_addr
Definition: MachO.h:926
llvm::MachO::arm_state_hdr_t::count
uint32_t count
Definition: MachO.h:1984
llvm::MachO::LOH_ARM64_ADRP_LDR_GOT
@ LOH_ARM64_ADRP_LDR_GOT
Definition: MachO.h:2383
llvm::MachO::CSTYPE_INDEX_ENTITLEMENTS
@ CSTYPE_INDEX_ENTITLEMENTS
Definition: MachO.h:2292
llvm::MachO::PLATFORM_IOSSIMULATOR
@ PLATFORM_IOSSIMULATOR
Definition: MachO.h:505
llvm::MachO::fp_status_t::denorm
unsigned short denorm
Definition: MachO.h:1732
llvm::MachO::fat_arch::size
uint32_t size
Definition: MachO.h:964
llvm::MachO::prebind_cksum_command::cmd
uint32_t cmd
Definition: MachO.h:788
llvm::MachO::X86_64_RELOC_BRANCH
@ X86_64_RELOC_BRANCH
Definition: MachO.h:482
llvm::Reloc::Model
Model
Definition: CodeGen.h:22
llvm::MachO::dyld_info_command
Definition: MachO.h:878
llvm::MachO::CPU_TYPE_POWERPC64
@ CPU_TYPE_POWERPC64
Definition: MachO.h:1572
llvm::MachO::x86_thread_state32_t::ss
uint32_t ss
Definition: MachO.h:1679
llvm::MachO::CS_EXECSEG_CAN_EXEC_CDHASH
@ CS_EXECSEG_CAN_EXEC_CDHASH
Definition: MachO.h:2248
llvm::MachO::N_EXCL
@ N_EXCL
Definition: MachO.h:386
llvm::MachO::x86_thread_state32_t::edi
uint32_t edi
Definition: MachO.h:1675
llvm::MachO::MH_CORE
@ MH_CORE
Definition: MachO.h:46
llvm::MachO::MH_FORCE_FLAT
@ MH_FORCE_FLAT
Definition: MachO.h:68
llvm::MachO::CS_CodeDirectory::nCodeSlots
uint32_t nCodeSlots
Definition: MachO.h:2327
llvm::MachO::x86_float_state64_t::fpu_xmm15
xmm_reg_t fpu_xmm15
Definition: MachO.h:1784
llvm::MachO::SecCSDigestAlgorithm
SecCSDigestAlgorithm
Definition: MachO.h:2365
llvm::MachO::REFERENCE_FLAG_PRIVATE_DEFINED
@ REFERENCE_FLAG_PRIVATE_DEFINED
Definition: MachO.h:338
llvm::MachO::mach_header::flags
uint32_t flags
Definition: MachO.h:523
llvm::MachO::version_min_command::version
uint32_t version
Definition: MachO.h:845
llvm::MachO::dysymtab_command::locreloff
uint32_t locreloff
Definition: MachO.h:728
llvm::MachO::PPC_RELOC_LO16_SECTDIFF
@ PPC_RELOC_LO16_SECTDIFF
Definition: MachO.h:430
llvm::MachO::routines_command_64::cmdsize
uint32_t cmdsize
Definition: MachO.h:689
llvm::MachO::data_in_code_entry
Definition: MachO.h:812
llvm::MachO::sub_client_command
Definition: MachO.h:636
llvm::MachO::MH_INCRLINK
@ MH_INCRLINK
Definition: MachO.h:61
llvm::MachO::REFERENCE_FLAG_UNDEFINED_LAZY
@ REFERENCE_FLAG_UNDEFINED_LAZY
Definition: MachO.h:336
llvm::MachO::fp_control_t::invalid
unsigned short invalid
Definition: MachO.h:1727
llvm::MachO::x86_float_state64_t::fpu_xmm4
xmm_reg_t fpu_xmm4
Definition: MachO.h:1773
llvm::MachO::section_64::segname
char segname[16]
Definition: MachO.h:586
llvm::MachO::CS_EXEC_SET_KILL
@ CS_EXEC_SET_KILL
Definition: MachO.h:2212
llvm::MachO::PLATFORM_UNKNOWN
@ PLATFORM_UNKNOWN
Definition: MachO.h:498
llvm::MachO::fat_arch
Definition: MachO.h:960
llvm::MachO::fat_arch_64::cputype
uint32_t cputype
Definition: MachO.h:969
llvm::MachO::ppc_state_hdr_t::count
uint32_t count
Definition: MachO.h:2109
llvm::MachO::DYLD_CHAINED_SYMBOL_ZLIB
@ DYLD_CHAINED_SYMBOL_ZLIB
Definition: MachO.h:1034
llvm::MachO::S_COALESCED
@ S_COALESCED
S_COALESCED - Section contains symbols that are to be coalesced.
Definition: MachO.h:152
llvm::MachO::REFERENCE_FLAG_DEFINED
@ REFERENCE_FLAG_DEFINED
Definition: MachO.h:337
llvm::MachO::REFERENCE_TYPE
@ REFERENCE_TYPE
Definition: MachO.h:334
llvm::MachO::ARM_EXCEPTION_STATE64
@ ARM_EXCEPTION_STATE64
Definition: MachO.h:2006
llvm::MachO::SELF_LIBRARY_ORDINAL
@ SELF_LIBRARY_ORDINAL
Definition: MachO.h:352
llvm::MachO::fvmlib::name
uint32_t name
Definition: MachO.h:605
llvm::MachO::ARM_VFP_STATE
@ ARM_VFP_STATE
Definition: MachO.h:2001
llvm::MachO::PPC_THREAD_STATE_NONE
@ PPC_THREAD_STATE_NONE
Definition: MachO.h:2131
llvm::MachO::CPU_SUBTYPE_ITANIUM
@ CPU_SUBTYPE_ITANIUM
Definition: MachO.h:1603
llvm::MachO::CPU_SUBTYPE_X86_ARCH1
@ CPU_SUBTYPE_X86_ARCH1
Definition: MachO.h:1610
llvm::MachO::N_PSYM
@ N_PSYM
Definition: MachO.h:382
llvm::MachO::CS_CodeDirectory::magic
uint32_t magic
Definition: MachO.h:2320
llvm::MachO::x86_EXCEPTION_STATE64
@ x86_EXCEPTION_STATE64
Definition: MachO.h:1901
llvm::MachO::N_RBRAC
@ N_RBRAC
Definition: MachO.h:387
llvm::MachO::routines_command
Definition: MachO.h:674
llvm::MachO::fp_control_t
Definition: MachO.h:1726
llvm::MachO::dysymtab_command::ntoc
uint32_t ntoc
Definition: MachO.h:719
llvm::MachO::CS_SuperBlob::count
uint32_t count
Definition: MachO.h:2361
llvm::MachO::N_ENTRY
@ N_ENTRY
Definition: MachO.h:384
llvm::MachO::routines_command::reserved4
uint32_t reserved4
Definition: MachO.h:682
llvm::MachO::PPCThreadFlavors
PPCThreadFlavors
Definition: MachO.h:2124
llvm::MachO::ppc_thread_state32_t::r22
uint32_t r22
Definition: MachO.h:2046
llvm::MachO::x86_thread_state64_t::fs
uint64_t fs
Definition: MachO.h:1709
llvm::MachO::any_relocation_info::r_word1
uint32_t r_word1
Definition: MachO.h:997
llvm::MachO::nlist_64::n_value
uint64_t n_value
Definition: MachO.h:1021
llvm::MachO::segment_command::cmd
uint32_t cmd
Definition: MachO.h:543
llvm::MachO::GENERIC_RELOC_PAIR
@ GENERIC_RELOC_PAIR
Definition: MachO.h:410
llvm::MachO::dysymtab_command::nextdefsym
uint32_t nextdefsym
Definition: MachO.h:715
llvm::MachO::twolevel_hints_command::nhints
uint32_t nhints
Definition: MachO.h:778
llvm::MachO::CSMAGIC_BLOBWRAPPER
@ CSMAGIC_BLOBWRAPPER
Definition: MachO.h:2264
llvm::MachO::CPU_SUBTYPE_ARM64_V8
@ CPU_SUBTYPE_ARM64_V8
Definition: MachO.h:1640
llvm::MachO::prebound_dylib_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:657
llvm::MachO::dyld_chained_import_addend64::weak_import
uint64_t weak_import
Definition: MachO.h:1110
llvm::MachO::MH_BINDS_TO_WEAK
@ MH_BINDS_TO_WEAK
Definition: MachO.h:76
llvm::MachO::dylib_table_of_contents
Definition: MachO.h:732
llvm::MachO::rpath_command::cmd
uint32_t cmd
Definition: MachO.h:800
llvm::MachO::x86_float_state64_t::fpu_mxcsrmask
uint32_t fpu_mxcsrmask
Definition: MachO.h:1760
llvm::MachO::CSSLOT_APPLICATION
@ CSSLOT_APPLICATION
Definition: MachO.h:2277
llvm::MachO::x86_float_state64_t::fpu_stmm2
mmst_reg_t fpu_stmm2
Definition: MachO.h:1763
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::MachO::routines_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:676
llvm::MachO::GET_LIBRARY_ORDINAL
uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc)
Definition: MachO.h:1535
llvm::MachO::N_PARAMS
@ N_PARAMS
Definition: MachO.h:379
llvm::MachO::CPU_SUBTYPE_POWERPC_602
@ CPU_SUBTYPE_POWERPC_602
Definition: MachO.h:1651
llvm::MachO::DYNAMIC_LOOKUP_ORDINAL
@ DYNAMIC_LOOKUP_ORDINAL
Definition: MachO.h:354
llvm::MachO::SET_COMM_ALIGN
void SET_COMM_ALIGN(uint16_t &n_desc, uint8_t align)
Definition: MachO.h:1547
llvm::MachO::CS_BlobIndex
Definition: MachO.h:2353
llvm::MachO::tlv_descriptor_32::key
uint32_t key
Definition: MachO.h:931
llvm::MachO::dyld_chained_ptr_64_rebase::bind
uint64_t bind
Definition: MachO.h:1134
llvm::MachO::dylib_reference::flags
uint32_t flags
Definition: MachO.h:770
llvm::MachO::uuid_command::uuid
uint8_t uuid[16]
Definition: MachO.h:796
llvm::MachO::PPC_RELOC_HA16_SECTDIFF
@ PPC_RELOC_HA16_SECTDIFF
Definition: MachO.h:431
llvm::MachO::ppc_thread_state32_t::ctr
uint32_t ctr
Definition: MachO.h:2059
llvm::MachO::MAX_SECT
@ MAX_SECT
Definition: MachO.h:327
llvm::MachO::N_TYPE
@ N_TYPE
Definition: MachO.h:309
llvm::MachO::DYLD_CHAINED_PTR_64_OFFSET
@ DYLD_CHAINED_PTR_64_OFFSET
Definition: MachO.h:1051
llvm::MachO::CSMAGIC_DETACHED_SIGNATURE
@ CSMAGIC_DETACHED_SIGNATURE
Definition: MachO.h:2262
llvm::MachO::CPU_SUBTYPE_INTEL_FAMILY_MAX
@ CPU_SUBTYPE_INTEL_FAMILY_MAX
Definition: MachO.h:1620
llvm::MachO::DYLD_CHAINED_PTR_X86_64_KERNEL_CACHE
@ DYLD_CHAINED_PTR_X86_64_KERNEL_CACHE
Definition: MachO.h:1056
t
bitcast float %x to i32 %s=and i32 %t, 2147483647 %d=bitcast i32 %s to float ret float %d } declare float @fabsf(float %n) define float @bar(float %x) nounwind { %d=call float @fabsf(float %x) ret float %d } This IR(from PR6194):target datalayout="e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple="x86_64-apple-darwin10.0.0" %0=type { double, double } %struct.float3=type { float, float, float } define void @test(%0, %struct.float3 *nocapture %res) nounwind noinline ssp { entry:%tmp18=extractvalue %0 %0, 0 t
Definition: README-SSE.txt:788
llvm::MachO::ppc_thread_state32_t::r9
uint32_t r9
Definition: MachO.h:2033
llvm::MachO::segment_command_64::segname
char segname[16]
Definition: MachO.h:559
llvm::MachO::N_SYMBOL_RESOLVER
@ N_SYMBOL_RESOLVER
Definition: MachO.h:347
llvm::MachO::N_STAB
@ N_STAB
Definition: MachO.h:307
llvm::MachO::N_PBUD
@ N_PBUD
Definition: MachO.h:319
llvm::MachO::nlist_64::n_sect
uint8_t n_sect
Definition: MachO.h:1019
llvm::MachO::MH_NO_HEAP_EXECUTION
@ MH_NO_HEAP_EXECUTION
Definition: MachO.h:84
llvm::MachO::CS_SUPPORTSEXECSEG
@ CS_SUPPORTSEXECSEG
Definition: MachO.h:2269
llvm::MachO::S_REGULAR
@ S_REGULAR
S_REGULAR - Regular section.
Definition: MachO.h:127
llvm::MachO::S_ATTR_DEBUG
@ S_ATTR_DEBUG
S_ATTR_DEBUG - A debug section.
Definition: MachO.h:207
llvm::MachO::x86_thread_state32_t::fs
uint32_t fs
Definition: MachO.h:1685
llvm::MachO::CPU_SUBTYPE_ARM_V7K
@ CPU_SUBTYPE_ARM_V7K
Definition: MachO.h:1632
llvm::MachO::DYLD_CHAINED_PTR_64
@ DYLD_CHAINED_PTR_64
Definition: MachO.h:1047
llvm::MachO::CS_SHA256_LEN
@ CS_SHA256_LEN
Definition: MachO.h:2300
llvm::MachO::x86_FP_RND_DOWN
@ x86_FP_RND_DOWN
Definition: MachO.h:1721
llvm::MachO::x86_thread_state64_t::rflags
uint64_t rflags
Definition: MachO.h:1707
llvm::MachO::CS_SIGNED
@ CS_SIGNED
Definition: MachO.h:2227
llvm::MachO::CPU_TYPE_POWERPC
@ CPU_TYPE_POWERPC
Definition: MachO.h:1571
llvm::MachO::GENERIC_RELOC_INVALID
@ GENERIC_RELOC_INVALID
Definition: MachO.h:408
llvm::MachO::x86_float_state64_t
Definition: MachO.h:1746
llvm::MachO::CPU_SUBTYPE_XEON_MP
@ CPU_SUBTYPE_XEON_MP
Definition: MachO.h:1606
llvm::MachO::dylib_module::objc_module_info_size
uint32_t objc_module_info_size
Definition: MachO.h:750
llvm::MachO::ARM_THREAD_STATE_COUNT
const uint32_t ARM_THREAD_STATE_COUNT
Definition: MachO.h:2015
llvm::MachO::dylib_module::nrefsym
uint32_t nrefsym
Definition: MachO.h:742
llvm::MachO::source_version_command
Definition: MachO.h:818
llvm::MachO::dylib_module_64::objc_module_info_addr
uint64_t objc_module_info_addr
Definition: MachO.h:766
llvm::MachO::DICE_KIND_ABS_JUMP_TABLE32
@ DICE_KIND_ABS_JUMP_TABLE32
Definition: MachO.h:231
llvm::MachO::fat_header::magic
uint32_t magic
Definition: MachO.h:956
llvm::MachO::x86_THREAD_STATE32_COUNT
const uint32_t x86_THREAD_STATE32_COUNT
Definition: MachO.h:1928
llvm::MachO::x86_float_state64_t::fpu_xmm10
xmm_reg_t fpu_xmm10
Definition: MachO.h:1779
llvm::MachO::CPU_SUBTYPE_POWERPC_ALL
@ CPU_SUBTYPE_POWERPC_ALL
Definition: MachO.h:1649
llvm::MachO::BIND_OPCODE_SET_TYPE_IMM
@ BIND_OPCODE_SET_TYPE_IMM
Definition: MachO.h:281
llvm::MachO::mach_header_64::reserved
uint32_t reserved
Definition: MachO.h:534
llvm::MachO::ppc_thread_state32_t::r2
uint32_t r2
Definition: MachO.h:2026
llvm::MachO::linkedit_data_command
Definition: MachO.h:805
llvm::MachO::arm_thread_state64_t::pad
uint32_t pad
Definition: MachO.h:1969
llvm::MachO::dylib_module::irefsym
uint32_t irefsym
Definition: MachO.h:741
llvm::MachO::CS_BlobIndex::offset
uint32_t offset
Definition: MachO.h:2355
llvm::MachO::N_OPT
@ N_OPT
Definition: MachO.h:369
llvm::MachO::kSecCodeSignatureHashSHA256
@ kSecCodeSignatureHashSHA256
Definition: MachO.h:2368
llvm::MachO::CPU_SUBTYPE_PENTPRO
@ CPU_SUBTYPE_PENTPRO
Definition: MachO.h:1592
llvm::MachO::GENERIC_RELOC_VANILLA
@ GENERIC_RELOC_VANILLA
Definition: MachO.h:409
llvm::MachO::segment_command::segname
char segname[16]
Definition: MachO.h:545
llvm::MachO::DYLD_CHAINED_PTR_ARM64E_FIRMWARE
@ DYLD_CHAINED_PTR_ARM64E_FIRMWARE
Definition: MachO.h:1055
llvm::MachO::REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
@ REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
Definition: MachO.h:251
llvm::MachO::ARM_RELOC_HALF
@ ARM_RELOC_HALF
Definition: MachO.h:447
llvm::MachO::x86_exception_state_t
Definition: MachO.h:1883
llvm::MachO::x86_thread_state32_t::esi
uint32_t esi
Definition: MachO.h:1676
llvm::MachO::CS_SUPPL_SIGNER_TYPE_TRUSTCACHE
@ CS_SUPPL_SIGNER_TYPE_TRUSTCACHE
Definition: MachO.h:2315
llvm::MachO::entry_point_command::entryoff
uint64_t entryoff
Definition: MachO.h:950
llvm::MachO::ppc_thread_state32_t::r21
uint32_t r21
Definition: MachO.h:2045
llvm::MachO::fp_control_t::ovrfl
unsigned short ovrfl
Definition: MachO.h:1727
llvm::MachO::PlatformType
PlatformType
Definition: MachO.h:497
llvm::MachO::x86_exception_state64_t::faultvaddr
uint64_t faultvaddr
Definition: MachO.h:1793
llvm::MachO::routines_command::init_address
uint32_t init_address
Definition: MachO.h:677
llvm::MachO::dysymtab_command::cmd
uint32_t cmd
Definition: MachO.h:710
llvm::MachO::x86_float_state64_t::fpu_xmm11
xmm_reg_t fpu_xmm11
Definition: MachO.h:1780
llvm::MachO::CS_LINKER_SIGNED
@ CS_LINKER_SIGNED
Definition: MachO.h:2205
llvm::MachO::x86_thread_state64_t::rip
uint64_t rip
Definition: MachO.h:1706
llvm::MachO::ident_command
Definition: MachO.h:916
llvm::MachO::N_WEAK_REF
@ N_WEAK_REF
Definition: MachO.h:345
llvm::MachO::arm_thread_state_t::tsh
arm_state_hdr_t tsh
Definition: MachO.h:1988
llvm::MachO::fp_control_t::zdiv
unsigned short zdiv
Definition: MachO.h:1727
llvm::MachO::DYLD_CHAINED_PTR_32_FIRMWARE
@ DYLD_CHAINED_PTR_32_FIRMWARE
Definition: MachO.h:1050
llvm::MachO::x86_thread_state64_t::r15
uint64_t r15
Definition: MachO.h:1705
llvm::MachO::ppc_thread_state32_t::r23
uint32_t r23
Definition: MachO.h:2047
llvm::MachO::SECTION_ATTRIBUTES
@ SECTION_ATTRIBUTES
Definition: MachO.h:115
llvm::MachO::N_RSYM
@ N_RSYM
Definition: MachO.h:370
llvm::MachO::PPC_RELOC_LO14
@ PPC_RELOC_LO14
Definition: MachO.h:426
llvm::MachO::section_64::nreloc
uint32_t nreloc
Definition: MachO.h:592
llvm::MachO::segment_command::initprot
uint32_t initprot
Definition: MachO.h:551
llvm::MachO::fp_status_t::busy
unsigned short busy
Definition: MachO.h:1734
llvm::MachO::x86_float_state64_t::fpu_xmm6
xmm_reg_t fpu_xmm6
Definition: MachO.h:1775
llvm::MachO::arm_thread_state_t
Definition: MachO.h:1987
llvm::MachO::BindType
BindType
Definition: MachO.h:254
llvm::MachO::twolevel_hints_command::cmd
uint32_t cmd
Definition: MachO.h:775
llvm::MachO::mach_header_64::magic
uint32_t magic
Definition: MachO.h:527
llvm::MachO::LOH_ARM64_ADRP_LDR
@ LOH_ARM64_ADRP_LDR
Definition: MachO.h:2377
llvm::MachO::getCPUSubType
Expected< uint32_t > getCPUSubType(const Triple &T)
Definition: MachO.cpp:95
llvm::MachO::sub_framework_command::cmd
uint32_t cmd
Definition: MachO.h:631
llvm::MachO::CS_SUPPORTSLINKAGE
@ CS_SUPPORTSLINKAGE
Definition: MachO.h:2271
llvm::MachO::PPC_EXCEPTION_STATE64
@ PPC_EXCEPTION_STATE64
Definition: MachO.h:2130
llvm::MachO::CS_KILLED
@ CS_KILLED
Definition: MachO.h:2218
llvm::MachO::section_64::flags
uint32_t flags
Definition: MachO.h:593
llvm::MachO::S_LAZY_SYMBOL_POINTERS
@ S_LAZY_SYMBOL_POINTERS
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
Definition: MachO.h:141
llvm::MachO::MH_CANONICAL
@ MH_CANONICAL
Definition: MachO.h:74
llvm::MachO::dysymtab_command::nundefsym
uint32_t nundefsym
Definition: MachO.h:717
llvm::MachO::x86_float_state64_t::fpu_rsrv3
uint16_t fpu_rsrv3
Definition: MachO.h:1758
llvm::MachO::twolevel_hint::itoc
uint32_t itoc
Definition: MachO.h:783
llvm::MachO::ARM_THUMB_32BIT_BRANCH
@ ARM_THUMB_32BIT_BRANCH
Definition: MachO.h:446
llvm::MachO::N_OSO
@ N_OSO
Definition: MachO.h:375
llvm::MachO::HeaderFileType
HeaderFileType
Definition: MachO.h:40
llvm::MachO::ppc_thread_state32_t::r25
uint32_t r25
Definition: MachO.h:2049
llvm::MachO::x86_float_state64_t::fpu_stmm4
mmst_reg_t fpu_stmm4
Definition: MachO.h:1765
llvm::MachO::BIND_SPECIAL_DYLIB_SELF
@ BIND_SPECIAL_DYLIB_SELF
Definition: MachO.h:261
llvm::MachO::arm_thread_state32_t::cpsr
uint32_t cpsr
Definition: MachO.h:1950
llvm::MachO::nlist_base::n_strx
uint32_t n_strx
Definition: MachO.h:1002
llvm::MachO::dylib_table_of_contents::symbol_index
uint32_t symbol_index
Definition: MachO.h:733
llvm::MachO::BIND_OPCODE_ADD_ADDR_ULEB
@ BIND_OPCODE_ADD_ADDR_ULEB
Definition: MachO.h:284
llvm::MachO::REBASE_OPCODE_DO_REBASE_IMM_TIMES
@ REBASE_OPCODE_DO_REBASE_IMM_TIMES
Definition: MachO.h:248
llvm::MachO::fp_status_t::undfl
unsigned short undfl
Definition: MachO.h:1732
llvm::MachO::S_INTERPOSING
@ S_INTERPOSING
S_INTERPOSING - Section with only pairs of function pointers for interposing.
Definition: MachO.h:158
llvm::MachO::SG_HIGHVM
@ SG_HIGHVM
Definition: MachO.h:106
llvm::MachO::ppc_state_hdr_t::flavor
uint32_t flavor
Definition: MachO.h:2108
llvm::MachO::sub_client_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:638
llvm::MachO::dyld_chained_import_addend64::lib_ordinal
uint64_t lib_ordinal
Definition: MachO.h:1109
llvm::MachO::CSMAGIC_REQUIREMENT
@ CSMAGIC_REQUIREMENT
Definition: MachO.h:2255
llvm::MachO::dyld_chained_starts_in_image::seg_info_offset
uint32_t seg_info_offset[1]
Definition: MachO.h:1078
llvm::MachO::S_NON_LAZY_SYMBOL_POINTERS
@ S_NON_LAZY_SYMBOL_POINTERS
S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
Definition: MachO.h:139
llvm::MachO::x86_thread_state32_t::eax
uint32_t eax
Definition: MachO.h:1671
llvm::MachO::tlv_descriptor::key
uintptr_t key
Definition: MachO.h:943
llvm::MachO::INDIRECT_SYMBOL_ABS
@ INDIRECT_SYMBOL_ABS
Definition: MachO.h:222
llvm::MachO::fvmlib_command
Definition: MachO.h:611
llvm::MachO::fp_control_t::precis
unsigned short precis
Definition: MachO.h:1728
llvm::MachO::CPU_SUBTYPE_ARM_V6
@ CPU_SUBTYPE_ARM_V6
Definition: MachO.h:1625
llvm::MachO::BIND_SPECIAL_DYLIB_FLAT_LOOKUP
@ BIND_SPECIAL_DYLIB_FLAT_LOOKUP
Definition: MachO.h:263
llvm::MachO::DYLD_CHAINED_PTR_64_KERNEL_CACHE
@ DYLD_CHAINED_PTR_64_KERNEL_CACHE
Definition: MachO.h:1053
llvm::MachO::N_COLD_FUNC
@ N_COLD_FUNC
Definition: MachO.h:349
llvm::MachO::ppc_thread_state32_t::vrsave
uint32_t vrsave
Definition: MachO.h:2061
llvm::MachO::EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION
@ EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION
Definition: MachO.h:293
llvm::MachO::routines_command::reserved3
uint32_t reserved3
Definition: MachO.h:681
llvm::MachO::CS_CodeDirectory::teamOffset
uint32_t teamOffset
Definition: MachO.h:2339
llvm::MachO::DYLD_CHAINED_PTR_ARM64E_KERNEL
@ DYLD_CHAINED_PTR_ARM64E_KERNEL
Definition: MachO.h:1052
llvm::MachO::BIND_TYPE_TEXT_ABSOLUTE32
@ BIND_TYPE_TEXT_ABSOLUTE32
Definition: MachO.h:256
llvm::MachO::CPU_SUBTYPE_PENTIUM_4
@ CPU_SUBTYPE_PENTIUM_4
Definition: MachO.h:1601
llvm::MachO::x86_THREAD_STATE64_COUNT
const uint32_t x86_THREAD_STATE64_COUNT
Definition: MachO.h:1931
llvm::MachO::mach_header_64
Definition: MachO.h:526
llvm::MachO::dyld_chained_starts_in_segment::page_size
uint16_t page_size
Page size in bytes (0x1000 or 0x4000)
Definition: MachO.h:1083
llvm::MachO::x86_thread_state32_t::ebp
uint32_t ebp
Definition: MachO.h:1677
llvm::MachO::VM_PROT_READ
@ VM_PROT_READ
Definition: MachO.h:494
llvm::MachO::ARM_THUMB_RELOC_BR22
@ ARM_THUMB_RELOC_BR22
Definition: MachO.h:445
llvm::MachO::S_ATTR_LIVE_SUPPORT
@ S_ATTR_LIVE_SUPPORT
S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.
Definition: MachO.h:202
llvm::MachO::SG_FVMLIB
@ SG_FVMLIB
Definition: MachO.h:107
llvm::MachO::N_ARM_THUMB_DEF
@ N_ARM_THUMB_DEF
Definition: MachO.h:342
llvm::MachO::build_version_command::minos
uint32_t minos
Definition: MachO.h:867
llvm::MachO::CS_HASHTYPE_SHA1
@ CS_HASHTYPE_SHA1
Definition: MachO.h:2294
llvm::MachO::ppc_thread_state32_t::xer
uint32_t xer
Definition: MachO.h:2057
llvm::MachO::BIND_TYPE_TEXT_PCREL32
@ BIND_TYPE_TEXT_PCREL32
Definition: MachO.h:257
llvm::MachO::x86_thread_state64_t::rbx
uint64_t rbx
Definition: MachO.h:1691
llvm::MachO::X86_64_RELOC_UNSIGNED
@ X86_64_RELOC_UNSIGNED
Definition: MachO.h:480
llvm::MachO::BIND_SYMBOL_FLAGS_WEAK_IMPORT
@ BIND_SYMBOL_FLAGS_WEAK_IMPORT
Definition: MachO.h:268
llvm::MachO::arm_thread_state32_t::pc
uint32_t pc
Definition: MachO.h:1949
llvm::MachO::fileset_entry_command::entry_id
uint32_t entry_id
Definition: MachO.h:904
llvm::MachO::dylib_command
Definition: MachO.h:624
llvm::MachO::N_EINCL
@ N_EINCL
Definition: MachO.h:383
llvm::MachO::arm_thread_state64_t::fp
uint64_t fp
Definition: MachO.h:1964
llvm::MachO::dyld_chained_ptr_64_bind
Definition: MachO.h:1120
llvm::MachO::symseg_command::size
uint32_t size
Definition: MachO.h:912
llvm::MachO::note_command
Definition: MachO.h:849
llvm::MachO::linkedit_data_command::datasize
uint32_t datasize
Definition: MachO.h:809
llvm::MachO::SECTION_ATTRIBUTES_SYS
@ SECTION_ATTRIBUTES_SYS
Definition: MachO.h:117
llvm::MachO::x86_state_hdr_t::flavor
uint32_t flavor
Definition: MachO.h:1864
llvm::MachO::prebind_cksum_command
Definition: MachO.h:787
llvm::MachO::ppc_thread_state_t::ts32
ppc_thread_state32_t ts32
Definition: MachO.h:2115
llvm::MachO::N_PEXT
@ N_PEXT
Definition: MachO.h:308
llvm::MachO::sub_umbrella_command::cmd
uint32_t cmd
Definition: MachO.h:643
llvm::MachO::CS_CodeDirectory::execSegFlags
uint64_t execSegFlags
Definition: MachO.h:2348
llvm::MachO::routines_command_64::reserved2
uint64_t reserved2
Definition: MachO.h:693
llvm::MachO::PPC_RELOC_VANILLA
@ PPC_RELOC_VANILLA
Definition: MachO.h:419
llvm::MachO::twolevel_hint
Definition: MachO.h:782
llvm::MachO::S_ATTR_PURE_INSTRUCTIONS
@ S_ATTR_PURE_INSTRUCTIONS
S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.
Definition: MachO.h:192
type
AMD64 Optimization Manual has some nice information about optimizing integer multiplication by a constant How much of it applies to Intel s X86 implementation There are definite trade offs to xmm0 cvttss2siq rdx jb L3 subss xmm0 rax cvttss2siq rdx xorq rdx rax ret instead of xmm1 cvttss2siq rcx movaps xmm2 subss xmm2 cvttss2siq rax rdx xorq rax ucomiss xmm0 cmovb rax ret Seems like the jb branch has high likelihood of being taken It would have saved a few instructions It s not possible to reference and DH registers in an instruction requiring REX prefix divb and mulb both produce results in AH If isel emits a CopyFromReg which gets turned into a movb and that can be allocated a r8b r15b To get around isel emits a CopyFromReg from AX and then right shift it down by and truncate it It s not pretty but it works We need some register allocation magic to make the hack go which would often require a callee saved register Callees usually need to keep this value live for most of their body so it doesn t add a significant burden on them We currently implement this in however this is suboptimal because it means that it would be quite awkward to implement the optimization for callers A better implementation would be to relax the LLVM IR rules for sret arguments to allow a function with an sret argument to have a non void return type
Definition: README-X86-64.txt:70
llvm::MachO::ppc_thread_state32_t::r4
uint32_t r4
Definition: MachO.h:2028
llvm::MachO::kSecCodeSignatureHashSHA1
@ kSecCodeSignatureHashSHA1
Definition: MachO.h:2367
llvm::MachO::x86_float_state64_t::fpu_xmm0
xmm_reg_t fpu_xmm0
Definition: MachO.h:1769
llvm::MachO::CS_CodeDirectory::version
uint32_t version
Definition: MachO.h:2322
llvm::MachO::CS_EXECSEG_DEBUGGER
@ CS_EXECSEG_DEBUGGER
Definition: MachO.h:2244
llvm::MachO::x86_thread_state32_t::ds
uint32_t ds
Definition: MachO.h:1683
llvm::MachO::ppc_thread_state32_t::r26
uint32_t r26
Definition: MachO.h:2050
llvm::MachO::routines_command::cmd
uint32_t cmd
Definition: MachO.h:675
llvm::MachO::dylinker_command::name
uint32_t name
Definition: MachO.h:666
llvm::MachO::fvmfile_command::cmd
uint32_t cmd
Definition: MachO.h:923
llvm::MachO::DICE_KIND_JUMP_TABLE32
@ DICE_KIND_JUMP_TABLE32
Definition: MachO.h:230
llvm::MachO::CPU_SUBTYPE_ARM_V4T
@ CPU_SUBTYPE_ARM_V4T
Definition: MachO.h:1624
llvm::MachO::x86_float_state64_t::fpu_xmm14
xmm_reg_t fpu_xmm14
Definition: MachO.h:1783
llvm::MachO::relocation_info
Definition: MachO.h:978
llvm::MachO::ppc_thread_state32_t::r16
uint32_t r16
Definition: MachO.h:2040
llvm::MachO::LinkerOptimizationHintKind
LinkerOptimizationHintKind
Definition: MachO.h:2375
llvm::MachO::S_MOD_INIT_FUNC_POINTERS
@ S_MOD_INIT_FUNC_POINTERS
S_MOD_INIT_FUNC_POINTERS - Section with only function pointers for initialization.
Definition: MachO.h:147
llvm::MachO::CS_NVRAM_UNRESTRICTED
@ CS_NVRAM_UNRESTRICTED
Definition: MachO.h:2200
llvm::MachO::fp_status_t::c0
unsigned short c0
Definition: MachO.h:1733
llvm::MachO::CPU_SUBTYPE_ARM_V6M
@ CPU_SUBTYPE_ARM_V6M
Definition: MachO.h:1633
llvm::MachO::SG_NORELOC
@ SG_NORELOC
Definition: MachO.h:108
uint64_t
llvm::MachO::section_64::reserved1
uint32_t reserved1
Definition: MachO.h:594
llvm::MachO::fvmfile_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:924
llvm::MachO::version_min_command::cmd
uint32_t cmd
Definition: MachO.h:842
llvm::MachO::BIND_TYPE_POINTER
@ BIND_TYPE_POINTER
Definition: MachO.h:255
llvm::MachO::x86_exception_state64_t::err
uint32_t err
Definition: MachO.h:1792
llvm::MachO::build_version_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:864
llvm::MachO::CS_CodeDirectory::hashType
uint8_t hashType
Definition: MachO.h:2330
llvm::MachO::x86_thread_state64_t::cs
uint64_t cs
Definition: MachO.h:1708
llvm::MachO::ARM64_RELOC_PAGE21
@ ARM64_RELOC_PAGE21
Definition: MachO.h:461
llvm::MachO::routines_command::init_module
uint32_t init_module
Definition: MachO.h:678
llvm::MachO::R_SCATTERED
@ R_SCATTERED
Definition: MachO.h:401
llvm::ARM_MB::ST
@ ST
Definition: ARMBaseInfo.h:73
llvm::MachO::CPU_SUBTYPE_INTEL_FAMILY
int CPU_SUBTYPE_INTEL_FAMILY(CPUSubTypeX86 ST)
Definition: MachO.h:1616
llvm::MachO::MH_NOMULTIDEFS
@ MH_NOMULTIDEFS
Definition: MachO.h:69
llvm::MachO::x86_fp_control_precis
x86_fp_control_precis
Definition: MachO.h:1713
llvm::MachO::dylib_module_64::module_name
uint32_t module_name
Definition: MachO.h:754
llvm::MachO::relocation_info::r_type
uint32_t r_type
Definition: MachO.h:981
llvm::MachO::dyld_chained_fixups_header::symbols_offset
uint32_t symbols_offset
Offset of symbol strings in chain_data.
Definition: MachO.h:1067
llvm::MachO::ARM_THREAD_STATE64
@ ARM_THREAD_STATE64
Definition: MachO.h:2005
llvm::MachO::dyld_chained_import_addend::weak_import
uint32_t weak_import
Definition: MachO.h:1102
llvm::MachO::N_INDR
@ N_INDR
Definition: MachO.h:320
llvm::MachO::x86_fp_control_rc
x86_fp_control_rc
Definition: MachO.h:1719
s
multiplies can be turned into SHL s
Definition: README.txt:370
llvm::MachO::relocation_info::r_extern
uint32_t r_extern
Definition: MachO.h:980
llvm::MachO::build_tool_version
Definition: MachO.h:857
llvm::MachO::dyld_chained_fixups_header::imports_count
uint32_t imports_count
Number of imported symbol names.
Definition: MachO.h:1068
llvm::MachO::any_relocation_info::r_word0
uint32_t r_word0
Definition: MachO.h:997
llvm::MachO::ppc_thread_state32_t::r20
uint32_t r20
Definition: MachO.h:2044
llvm::MachO::CPU_SUBTYPE_ARM_V7S
@ CPU_SUBTYPE_ARM_V7S
Definition: MachO.h:1631
llvm::MachO::CPU_SUBTYPE_POWERPC_620
@ CPU_SUBTYPE_POWERPC_620
Definition: MachO.h:1657
llvm::MachO::x86_FLOAT_STATE
@ x86_FLOAT_STATE
Definition: MachO.h:1903
llvm::MachO::REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY
@ REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY
Definition: MachO.h:339
llvm::MachO::MH_SUBSECTIONS_VIA_SYMBOLS
@ MH_SUBSECTIONS_VIA_SYMBOLS
Definition: MachO.h:73
llvm::MachO::CS_ALLOWED_MACHO
@ CS_ALLOWED_MACHO
Definition: MachO.h:2207
llvm::numbers::e
constexpr double e
Definition: MathExtras.h:53
llvm::MachO::MH_CIGAM
@ MH_CIGAM
Definition: MachO.h:31
llvm::MachO::N_SO
@ N_SO
Definition: MachO.h:374
llvm::MachO::dyld_info_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:880
llvm::MachO::X86_64_RELOC_GOT
@ X86_64_RELOC_GOT
Definition: MachO.h:484
llvm::MachO::dyld_chained_starts_in_segment::pointer_format
uint16_t pointer_format
DYLD_CHAINED_PTR*.
Definition: MachO.h:1084
llvm::MachO::dyld_chained_ptr_64_rebase::next
uint64_t next
Definition: MachO.h:1133
llvm::MachO::CSMAGIC_EMBEDDED_SIGNATURE_OLD
@ CSMAGIC_EMBEDDED_SIGNATURE_OLD
Definition: MachO.h:2260
llvm::MachO::REBASE_OPCODE_ADD_ADDR_IMM_SCALED
@ REBASE_OPCODE_ADD_ADDR_IMM_SCALED
Definition: MachO.h:247
llvm::MachO::MH_OBJECT
@ MH_OBJECT
Definition: MachO.h:43
llvm::MachO::CPU_TYPE_X86
@ CPU_TYPE_X86
Definition: MachO.h:1562
llvm::MachO::fileset_entry_command::fileoff
uint64_t fileoff
Definition: MachO.h:903
llvm::MachO::fat_arch::offset
uint32_t offset
Definition: MachO.h:963
llvm::MachO::CPU_SUBTYPE_POWERPC_750
@ CPU_SUBTYPE_POWERPC_750
Definition: MachO.h:1658
llvm::MachO::X86_64_RELOC_GOT_LOAD
@ X86_64_RELOC_GOT_LOAD
Definition: MachO.h:483
llvm::MachO::ppc_thread_state32_t::r27
uint32_t r27
Definition: MachO.h:2051
llvm::MachO::N_LCSYM
@ N_LCSYM
Definition: MachO.h:365
llvm::MachO::x86_exception_state_t::esh
x86_state_hdr_t esh
Definition: MachO.h:1884
llvm::MachO::CPU_SUBTYPE_X86_64_H
@ CPU_SUBTYPE_X86_64_H
Definition: MachO.h:1611
llvm::MachO::BIND_OPCODE_MASK
@ BIND_OPCODE_MASK
Definition: MachO.h:271
llvm::MachO::scattered_relocation_info::r_address
uint32_t r_address
Definition: MachO.h:989
llvm::MachO::tlv_descriptor_64::offset
uint64_t offset
Definition: MachO.h:938
llvm::MachO::CS_ENTITLEMENT_FLAGS
@ CS_ENTITLEMENT_FLAGS
Definition: MachO.h:2234
llvm::MachO::sub_library_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:650
llvm::MachO::CS_ADHOC
@ CS_ADHOC
Definition: MachO.h:2182
llvm::MachO::CPU_SUBTYPE_PENTIUM_4_M
@ CPU_SUBTYPE_PENTIUM_4_M
Definition: MachO.h:1602
llvm::MachO::CPU_SUBTYPE_INTEL_MODEL_ALL
@ CPU_SUBTYPE_INTEL_MODEL_ALL
Definition: MachO.h:1620
llvm::MachO::nlist_base::n_type
uint8_t n_type
Definition: MachO.h:1003
llvm::MachO::section::reserved1
uint32_t reserved1
Definition: MachO.h:580
llvm::MachO::dyld_chained_import_addend::lib_ordinal
uint32_t lib_ordinal
Definition: MachO.h:1101
llvm::MachO::prebind_cksum_command::cksum
uint32_t cksum
Definition: MachO.h:790
llvm::MachO::dyld_info_command::weak_bind_size
uint32_t weak_bind_size
Definition: MachO.h:886
llvm::MachO::CPU_TYPE_ARM64
@ CPU_TYPE_ARM64
Definition: MachO.h:1568
llvm::MachO::CPU_SUBTYPE_386
@ CPU_SUBTYPE_386
Definition: MachO.h:1587
llvm::MachO::x86_float_state64_t::fpu_stmm1
mmst_reg_t fpu_stmm1
Definition: MachO.h:1762
llvm::MachO::dyld_info_command::lazy_bind_off
uint32_t lazy_bind_off
Definition: MachO.h:887
llvm::MachO::x86_float_state64_t::fpu_ip
uint32_t fpu_ip
Definition: MachO.h:1753
llvm::MachO::CS_BlobIndex::type
uint32_t type
Definition: MachO.h:2354
llvm::MachO::x86_FP_PREC_53B
@ x86_FP_PREC_53B
Definition: MachO.h:1715
llvm::MachO::REBASE_OPCODE_DO_REBASE_ULEB_TIMES
@ REBASE_OPCODE_DO_REBASE_ULEB_TIMES
Definition: MachO.h:249
llvm::MachO::ppc_thread_state32_t::r15
uint32_t r15
Definition: MachO.h:2039
llvm::MachO::PLATFORM_BRIDGEOS
@ PLATFORM_BRIDGEOS
Definition: MachO.h:503
llvm::MachO::build_version_command::cmd
uint32_t cmd
Definition: MachO.h:863
llvm::MachO::segment_command_64::fileoff
uint64_t fileoff
Definition: MachO.h:562
llvm::MachO::linker_option_command
Definition: MachO.h:893
llvm::MachO::x86_thread_state64_t
Definition: MachO.h:1689
llvm::MachO::dyld_info_command::bind_size
uint32_t bind_size
Definition: MachO.h:884
llvm::MachO::MH_LAZY_INIT
@ MH_LAZY_INIT
Definition: MachO.h:66
llvm::MachO::arm_thread_state32_t::sp
uint32_t sp
Definition: MachO.h:1947
llvm::MachO::CPU_SUBTYPE_ARM64_ALL
@ CPU_SUBTYPE_ARM64_ALL
Definition: MachO.h:1639
llvm::MachO::fvmfile_command
Definition: MachO.h:922
llvm::MachO::prebound_dylib_command::linked_modules
uint32_t linked_modules
Definition: MachO.h:660
llvm::MachO::dyld_chained_ptr_64_bind::next
uint64_t next
Definition: MachO.h:1124
llvm::MachO::dylib_table_of_contents::module_index
uint32_t module_index
Definition: MachO.h:734
llvm::MachO::MH_DYLINKER
@ MH_DYLINKER
Definition: MachO.h:49
llvm::MachO::x86_FP_RND_NEAR
@ x86_FP_RND_NEAR
Definition: MachO.h:1720
llvm::MachO::S_4BYTE_LITERALS
@ S_4BYTE_LITERALS
S_4BYTE_LITERALS - Section with 4 byte literals.
Definition: MachO.h:133
llvm::MachO::CS_EXEC_SET_ENFORCEMENT
@ CS_EXEC_SET_ENFORCEMENT
Definition: MachO.h:2213
llvm::MachO::build_version_command::platform
uint32_t platform
Definition: MachO.h:866
llvm::MachO::fvmfile_command::name
uint32_t name
Definition: MachO.h:925
llvm::MachO::RebaseType
RebaseType
Definition: MachO.h:234
llvm::MachO::dysymtab_command::modtaboff
uint32_t modtaboff
Definition: MachO.h:720
llvm::MachO::N_AST
@ N_AST
Definition: MachO.h:368
llvm::MachO::MH_KEXT_BUNDLE
@ MH_KEXT_BUNDLE
Definition: MachO.h:53
llvm::MachO::nlist::n_desc
int16_t n_desc
Definition: MachO.h:1012
llvm::MachO::S_THREAD_LOCAL_VARIABLES
@ S_THREAD_LOCAL_VARIABLES
S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.
Definition: MachO.h:172
llvm::MachO::S_THREAD_LOCAL_REGULAR
@ S_THREAD_LOCAL_REGULAR
S_THREAD_LOCAL_REGULAR - Thread local data section.
Definition: MachO.h:167
llvm::MachO::dyld_chained_starts_in_segment::page_count
uint16_t page_count
Length of the page_start array.
Definition: MachO.h:1087
llvm::MachO::fp_status_t::c2
unsigned short c2
Definition: MachO.h:1733
llvm::MachO::routines_command::reserved5
uint32_t reserved5
Definition: MachO.h:683
llvm::MachO::CS_CodeDirectory::spare2
uint32_t spare2
Definition: MachO.h:2333
llvm::MachO::dylinker_command::cmd
uint32_t cmd
Definition: MachO.h:664
llvm::MachO::dylib_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:626
llvm::MachO::dyld_env_command
Definition: MachO.h:872
llvm::MachO::x86_thread_state64_t::rsp
uint64_t rsp
Definition: MachO.h:1697
llvm::MachO::dyld_chained_fixups_header
Structs for dyld chained fixups.
Definition: MachO.h:1063
llvm::MachO::ppc_thread_state32_t::r3
uint32_t r3
Definition: MachO.h:2027
llvm::MachO::symseg_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:910
llvm::MachO::DYLD_CHAINED_IMPORT_ADDEND
@ DYLD_CHAINED_IMPORT_ADDEND
Definition: MachO.h:1027
llvm::MachO::dysymtab_command::nlocrel
uint32_t nlocrel
Definition: MachO.h:729
llvm::MachO::segment_command
Definition: MachO.h:542
llvm::MachO::N_ALT_ENTRY
@ N_ALT_ENTRY
Definition: MachO.h:348
llvm::MachO::ARM64_RELOC_POINTER_TO_GOT
@ ARM64_RELOC_POINTER_TO_GOT
Definition: MachO.h:469
llvm::MachO::TOOL_CLANG
@ TOOL_CLANG
Definition: MachO.h:512
llvm::MachO::CPU_SUBTYPE_POWERPC_601
@ CPU_SUBTYPE_POWERPC_601
Definition: MachO.h:1650
llvm::MachO::CS_SUPPL_SIGNER_TYPE_LOCAL
@ CS_SUPPL_SIGNER_TYPE_LOCAL
Definition: MachO.h:2316
llvm::MachO::fp_status_t::zdiv
unsigned short zdiv
Definition: MachO.h:1732
llvm::MachO::CS_RESTRICT
@ CS_RESTRICT
Definition: MachO.h:2194
llvm::MachO::arm_thread_state64_t
Definition: MachO.h:1962
llvm::MachO::kSecCodeSignatureHashSHA256Truncated
@ kSecCodeSignatureHashSHA256Truncated
Definition: MachO.h:2369
llvm::MachO::twolevel_hint::isub_image
uint32_t isub_image
Definition: MachO.h:783
llvm::MachO::dylinker_command
Definition: MachO.h:663
llvm::MachO::SECTION_ATTRIBUTES_USR
@ SECTION_ATTRIBUTES_USR
Definition: MachO.h:116
llvm::MachO::RebaseOpcode
RebaseOpcode
Definition: MachO.h:242
llvm::MachO::x86_FP_CHOP
@ x86_FP_CHOP
Definition: MachO.h:1723
llvm::MachO::dysymtab_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:711
llvm::MachO::ARM_THREAD_STATE
@ ARM_THREAD_STATE
Definition: MachO.h:2000
llvm::MachO::fat_arch_64::cpusubtype
uint32_t cpusubtype
Definition: MachO.h:970
llvm::MachO::section::flags
uint32_t flags
Definition: MachO.h:579
llvm::MachO::N_LSYM
@ N_LSYM
Definition: MachO.h:376
llvm::MachO::encryption_info_command::cryptid
uint32_t cryptid
Definition: MachO.h:829
llvm::MachO::N_FNAME
@ N_FNAME
Definition: MachO.h:362
llvm::MachO::x86_float_state64_t::fpu_mxcsr
uint32_t fpu_mxcsr
Definition: MachO.h:1759
llvm::MachO::x86_FLOAT_STATE64_COUNT
const uint32_t x86_FLOAT_STATE64_COUNT
Definition: MachO.h:1933
llvm::MachO::X86ThreadFlavors
X86ThreadFlavors
Definition: MachO.h:1895
info
lazy value info
Definition: LazyValueInfo.cpp:58
llvm::MachO::MH_ROOT_SAFE
@ MH_ROOT_SAFE
Definition: MachO.h:78
llvm::MachO::GENERIC_RELOC_TLV
@ GENERIC_RELOC_TLV
Definition: MachO.h:414
llvm::MachO::X86_64_RELOC_SUBTRACTOR
@ X86_64_RELOC_SUBTRACTOR
Definition: MachO.h:485
llvm::MachO::note_command::size
uint64_t size
Definition: MachO.h:854
llvm::MachO::x86_EXCEPTION_STATE32
@ x86_EXCEPTION_STATE32
Definition: MachO.h:1898
llvm::MachO::SG_PROTECTED_VERSION_1
@ SG_PROTECTED_VERSION_1
Definition: MachO.h:109
llvm::MachO::segment_command::vmaddr
uint32_t vmaddr
Definition: MachO.h:546
llvm::MachO::x86_EXCEPTION_STATE_COUNT
const uint32_t x86_EXCEPTION_STATE_COUNT
Definition: MachO.h:1942
llvm::MachO::DYLD_CHAINED_PTR_START_LAST
@ DYLD_CHAINED_PTR_START_LAST
Definition: MachO.h:1041
llvm::MachO::REBASE_OPCODE_DONE
@ REBASE_OPCODE_DONE
Definition: MachO.h:243
llvm::MachO::CS_DYLD_PLATFORM
@ CS_DYLD_PLATFORM
Definition: MachO.h:2219
llvm::MachO::dylib_command::cmd
uint32_t cmd
Definition: MachO.h:625
llvm::MachO::CPU_SUBTYPE_CELERON
@ CPU_SUBTYPE_CELERON
Definition: MachO.h:1595
llvm::MachO::dysymtab_command::extrefsymoff
uint32_t extrefsymoff
Definition: MachO.h:722
llvm::MachO::dyld_chained_import_addend::name_offset
uint32_t name_offset
Definition: MachO.h:1103
llvm::MachO::load_command
Definition: MachO.h:537
llvm::MachO::MH_FVMLIB
@ MH_FVMLIB
Definition: MachO.h:45
llvm::MachO::BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB
@ BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB
Definition: MachO.h:278
llvm::MachO::CS_EXECSEG_ALLOW_UNSIGNED
@ CS_EXECSEG_ALLOW_UNSIGNED
Definition: MachO.h:2243
llvm::MachO::CS_INSTALLER
@ CS_INSTALLER
Definition: MachO.h:2184
llvm::MachO::ARM_DEBUG_STATE
@ ARM_DEBUG_STATE
Definition: MachO.h:2003
llvm::MachO::nlist::n_strx
uint32_t n_strx
Definition: MachO.h:1009
llvm::MachO::section::reloff
uint32_t reloff
Definition: MachO.h:577
llvm::MachO::prebound_dylib_command::nmodules
uint32_t nmodules
Definition: MachO.h:659
llvm::MachO::ARN_THREAD_STATE_NONE
@ ARN_THREAD_STATE_NONE
Definition: MachO.h:2004
llvm::MachO::CS_KILL
@ CS_KILL
Definition: MachO.h:2192
llvm::MachO::CS_EXECSEG_SKIP_LV
@ CS_EXECSEG_SKIP_LV
Definition: MachO.h:2246
llvm::MachO::CSTYPE_INDEX_REQUIREMENTS
@ CSTYPE_INDEX_REQUIREMENTS
Definition: MachO.h:2291
llvm::MachO::x86_exception_state64_t
Definition: MachO.h:1789
llvm::MachO::x86_float_state64_t::fpu_stmm6
mmst_reg_t fpu_stmm6
Definition: MachO.h:1767
llvm::MachO::fvmlib_command::cmd
uint32_t cmd
Definition: MachO.h:612
llvm::MachO::CPU_SUBTYPE_586
@ CPU_SUBTYPE_586
Definition: MachO.h:1590
llvm::MachO::x86_thread_state64_t::rsi
uint64_t rsi
Definition: MachO.h:1695
llvm::MachO::scattered_relocation_info::r_scattered
uint32_t r_scattered
Definition: MachO.h:990
llvm::MachO::x86_thread_state64_t::r12
uint64_t r12
Definition: MachO.h:1702
llvm::MachO::x86_float_state64_t::fpu_xmm2
xmm_reg_t fpu_xmm2
Definition: MachO.h:1771
llvm::MachO::mmst_reg_t
Definition: MachO.h:1737
llvm::MachO::mach_header::sizeofcmds
uint32_t sizeofcmds
Definition: MachO.h:522
llvm::MachO::PPC_RELOC_PB_LA_PTR
@ PPC_RELOC_PB_LA_PTR
Definition: MachO.h:428
llvm::MachO::dyld_chained_fixups_header::symbols_format
uint32_t symbols_format
0 => uncompressed, 1 => zlib compressed
Definition: MachO.h:1070
llvm::MachO::CS_CodeDirectory::platform
uint8_t platform
Definition: MachO.h:2331
llvm::MachO::dysymtab_command::iextdefsym
uint32_t iextdefsym
Definition: MachO.h:714
llvm::MachO::symtab_command::cmd
uint32_t cmd
Definition: MachO.h:701
llvm::MachO::CPU_SUBTYPE_ARM_XSCALE
@ CPU_SUBTYPE_ARM_XSCALE
Definition: MachO.h:1628
llvm::MachO::N_SECT
@ N_SECT
Definition: MachO.h:318
llvm::MachO::x86_float_state64_t::fpu_cs
uint16_t fpu_cs
Definition: MachO.h:1754
llvm::MachO::symseg_command::offset
uint32_t offset
Definition: MachO.h:911
llvm::MachO::CPU_SUBTYPE_POWERPC_604
@ CPU_SUBTYPE_POWERPC_604
Definition: MachO.h:1655
llvm::MachO::scattered_relocation_info::r_length
uint32_t r_length
Definition: MachO.h:989
llvm::MachO::BIND_OPCODE_SET_ADDEND_SLEB
@ BIND_OPCODE_SET_ADDEND_SLEB
Definition: MachO.h:282
llvm::MachO::CPU_SUBTYPE_MC980000_ALL
@ CPU_SUBTYPE_MC980000_ALL
Definition: MachO.h:1663
llvm::MachO::fp_control_t::undfl
unsigned short undfl
Definition: MachO.h:1727
llvm::MachO::MH_HAS_TLV_DESCRIPTORS
@ MH_HAS_TLV_DESCRIPTORS
Definition: MachO.h:83
llvm::MachO::x86_thread_state32_t::ecx
uint32_t ecx
Definition: MachO.h:1673
llvm::MachO::linkedit_data_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:807
llvm::MachO::S_ATTR_EXT_RELOC
@ S_ATTR_EXT_RELOC
S_ATTR_EXT_RELOC - Section has external relocation entries.
Definition: MachO.h:215
llvm::MachO::x86_exception_state_t::ues
union llvm::MachO::x86_exception_state_t::@155 ues
llvm::MachO::DataRegionType
DataRegionType
Definition: MachO.h:225
llvm::MachO::dyld_info_command::rebase_size
uint32_t rebase_size
Definition: MachO.h:882
uint32_t
llvm::MachO::DYLD_CHAINED_IMPORT_ADDEND64
@ DYLD_CHAINED_IMPORT_ADDEND64
Definition: MachO.h:1028
Compiler.h
llvm::MachO::twolevel_hints_command::offset
uint32_t offset
Definition: MachO.h:777
llvm::MachO::arm_thread_state64_t::x
uint64_t x[29]
Definition: MachO.h:1963
llvm::MachO::x86_thread_state32_t::gs
uint32_t gs
Definition: MachO.h:1686
llvm::MachO::segment_command_64
Definition: MachO.h:556
llvm::MachO::BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE
@ BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE
Definition: MachO.h:262
llvm::MachO::arm_state_hdr_t::flavor
uint32_t flavor
Definition: MachO.h:1983
llvm::MachO::dylib_module_64::nextrel
uint32_t nextrel
Definition: MachO.h:762
llvm::MachO::dyld_chained_import_addend64::addend
uint64_t addend
Definition: MachO.h:1113
llvm::MachO::x86_thread_state_t::ts64
x86_thread_state64_t ts64
Definition: MachO.h:1871
llvm::MachO::x86_float_state_t::fs64
x86_float_state64_t fs64
Definition: MachO.h:1879
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::MachO::x86_thread_state64_t::rbp
uint64_t rbp
Definition: MachO.h:1696
llvm::MachO::dyld_chained_import_addend::addend
int32_t addend
Definition: MachO.h:1104
llvm::MachO::ARM_RELOC_VANILLA
@ ARM_RELOC_VANILLA
Definition: MachO.h:439
llvm::MachO::arm_thread_state32_t
Definition: MachO.h:1945
llvm::MachO::section_64::reserved3
uint32_t reserved3
Definition: MachO.h:596
llvm::MachO::x86_float_state64_t::fpu_rsrv2
uint16_t fpu_rsrv2
Definition: MachO.h:1755
llvm::MachO::DYLD_CHAINED_PTR_32_CACHE
@ DYLD_CHAINED_PTR_32_CACHE
Definition: MachO.h:1049
llvm::MachO::x86_float_state64_t::fpu_dp
uint32_t fpu_dp
Definition: MachO.h:1756
llvm::MachO::dylib_module_64::objc_module_info_size
uint32_t objc_module_info_size
Definition: MachO.h:765
llvm::MachO::note_command::offset
uint64_t offset
Definition: MachO.h:853
llvm::MachO::tlv_descriptor_32
Definition: MachO.h:929
llvm::MachO::sub_library_command::sub_library
uint32_t sub_library
Definition: MachO.h:651
llvm::MachO::S_DTRACE_DOF
@ S_DTRACE_DOF
S_DTRACE_DOF - Section contains DTrace Object Format.
Definition: MachO.h:162
llvm::MachO::N_ABS
@ N_ABS
Definition: MachO.h:317
llvm::MachO::CPUSubTypeARM64
CPUSubTypeARM64
Definition: MachO.h:1638
llvm::MachO::nlist_base::n_desc
uint16_t n_desc
Definition: MachO.h:1005
llvm::MachO::x86_thread_state32_t::cs
uint32_t cs
Definition: MachO.h:1682
llvm::MachO::GENERIC_RELOC_LOCAL_SECTDIFF
@ GENERIC_RELOC_LOCAL_SECTDIFF
Definition: MachO.h:413
llvm::MachO::x86_thread_state64_t::rdx
uint64_t rdx
Definition: MachO.h:1693
llvm::MachO::RelocationInfoType
RelocationInfoType
Definition: MachO.h:404
llvm::MachO::x86_float_state64_t::fpu_xmm8
xmm_reg_t fpu_xmm8
Definition: MachO.h:1777
llvm::MachO::ppc_thread_state32_t::srr1
uint32_t srr1
Definition: MachO.h:2023