LLVM  13.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 };
55 
56 enum {
57  // Constant bits for the "flags" field in llvm::MachO::mach_header and
58  // llvm::MachO::mach_header_64
59  MH_NOUNDEFS = 0x00000001u,
60  MH_INCRLINK = 0x00000002u,
61  MH_DYLDLINK = 0x00000004u,
62  MH_BINDATLOAD = 0x00000008u,
63  MH_PREBOUND = 0x00000010u,
64  MH_SPLIT_SEGS = 0x00000020u,
65  MH_LAZY_INIT = 0x00000040u,
66  MH_TWOLEVEL = 0x00000080u,
67  MH_FORCE_FLAT = 0x00000100u,
68  MH_NOMULTIDEFS = 0x00000200u,
69  MH_NOFIXPREBINDING = 0x00000400u,
70  MH_PREBINDABLE = 0x00000800u,
71  MH_ALLMODSBOUND = 0x00001000u,
73  MH_CANONICAL = 0x00004000u,
74  MH_WEAK_DEFINES = 0x00008000u,
75  MH_BINDS_TO_WEAK = 0x00010000u,
76  MH_ALLOW_STACK_EXECUTION = 0x00020000u,
77  MH_ROOT_SAFE = 0x00040000u,
78  MH_SETUID_SAFE = 0x00080000u,
79  MH_NO_REEXPORTED_DYLIBS = 0x00100000u,
80  MH_PIE = 0x00200000u,
81  MH_DEAD_STRIPPABLE_DYLIB = 0x00400000u,
82  MH_HAS_TLV_DESCRIPTORS = 0x00800000u,
83  MH_NO_HEAP_EXECUTION = 0x01000000u,
84  MH_APP_EXTENSION_SAFE = 0x02000000u,
86  MH_SIM_SUPPORT = 0x08000000u,
87  MH_DYLIB_IN_CACHE = 0x80000000u,
88 };
89 
90 enum : uint32_t {
91  // Flags for the "cmd" field in llvm::MachO::load_command
92  LC_REQ_DYLD = 0x80000000u
93 };
94 
95 #define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) LCName = LCValue,
96 
98 #include "llvm/BinaryFormat/MachO.def"
99 };
100 
101 #undef HANDLE_LOAD_COMMAND
102 
103 enum : uint32_t {
104  // Constant bits for the "flags" field in llvm::MachO::segment_command
105  SG_HIGHVM = 0x1u,
106  SG_FVMLIB = 0x2u,
107  SG_NORELOC = 0x4u,
109 
110  // Constant masks for the "flags" field in llvm::MachO::section and
111  // llvm::MachO::section_64
112  SECTION_TYPE = 0x000000ffu, // SECTION_TYPE
113  SECTION_ATTRIBUTES = 0xffffff00u, // SECTION_ATTRIBUTES
114  SECTION_ATTRIBUTES_USR = 0xff000000u, // SECTION_ATTRIBUTES_USR
115  SECTION_ATTRIBUTES_SYS = 0x00ffff00u // SECTION_ATTRIBUTES_SYS
116 };
117 
118 /// These are the section type and attributes fields. A MachO section can
119 /// have only one Type, but can have any of the attributes specified.
121  // Constant masks for the "flags[7:0]" field in llvm::MachO::section and
122  // llvm::MachO::section_64 (mask "flags" with SECTION_TYPE)
123 
124  /// S_REGULAR - Regular section.
125  S_REGULAR = 0x00u,
126  /// S_ZEROFILL - Zero fill on demand section.
127  S_ZEROFILL = 0x01u,
128  /// S_CSTRING_LITERALS - Section with literal C strings.
130  /// S_4BYTE_LITERALS - Section with 4 byte literals.
132  /// S_8BYTE_LITERALS - Section with 8 byte literals.
134  /// S_LITERAL_POINTERS - Section with pointers to literals.
136  /// S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
138  /// S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
140  /// S_SYMBOL_STUBS - Section with symbol stubs, byte size of stub in
141  /// the Reserved2 field.
142  S_SYMBOL_STUBS = 0x08u,
143  /// S_MOD_INIT_FUNC_POINTERS - Section with only function pointers for
144  /// initialization.
146  /// S_MOD_TERM_FUNC_POINTERS - Section with only function pointers for
147  /// termination.
149  /// S_COALESCED - Section contains symbols that are to be coalesced.
150  S_COALESCED = 0x0bu,
151  /// S_GB_ZEROFILL - Zero fill on demand section (that can be larger than 4
152  /// gigabytes).
153  S_GB_ZEROFILL = 0x0cu,
154  /// S_INTERPOSING - Section with only pairs of function pointers for
155  /// interposing.
156  S_INTERPOSING = 0x0du,
157  /// S_16BYTE_LITERALS - Section with only 16 byte literals.
159  /// S_DTRACE_DOF - Section contains DTrace Object Format.
160  S_DTRACE_DOF = 0x0fu,
161  /// S_LAZY_DYLIB_SYMBOL_POINTERS - Section with lazy symbol pointers to
162  /// lazy loaded dylibs.
164  /// S_THREAD_LOCAL_REGULAR - Thread local data section.
166  /// S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.
168  /// S_THREAD_LOCAL_VARIABLES - Section with thread local variable
169  /// structure data.
171  /// S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread
172  /// local structures.
174  /// S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local
175  /// variable initialization pointers to functions.
177 
179 };
180 
181 enum : uint32_t {
182  // Constant masks for the "flags[31:24]" field in llvm::MachO::section and
183  // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_USR)
184 
185  /// S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine
186  /// instructions.
188  /// S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be
189  /// in a ranlib table of contents.
190  S_ATTR_NO_TOC = 0x40000000u,
191  /// S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section
192  /// in files with the MY_DYLDLINK flag.
194  /// S_ATTR_NO_DEAD_STRIP - No dead stripping.
195  S_ATTR_NO_DEAD_STRIP = 0x10000000u,
196  /// S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.
197  S_ATTR_LIVE_SUPPORT = 0x08000000u,
198  /// S_ATTR_SELF_MODIFYING_CODE - Used with i386 code stubs written on by
199  /// dyld.
201  /// S_ATTR_DEBUG - A debug section.
202  S_ATTR_DEBUG = 0x02000000u,
203 
204  // Constant masks for the "flags[23:8]" field in llvm::MachO::section and
205  // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_SYS)
206 
207  /// S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.
209  /// S_ATTR_EXT_RELOC - Section has external relocation entries.
210  S_ATTR_EXT_RELOC = 0x00000200u,
211  /// S_ATTR_LOC_RELOC - Section has local relocation entries.
212  S_ATTR_LOC_RELOC = 0x00000100u,
213 
214  // Constant masks for the value of an indirect symbol in an indirect
215  // symbol table
216  INDIRECT_SYMBOL_LOCAL = 0x80000000u,
217  INDIRECT_SYMBOL_ABS = 0x40000000u
218 };
219 
221  // Constants for the "kind" field in a data_in_code_entry structure
227 };
228 
233 };
234 
235 enum { REBASE_OPCODE_MASK = 0xF0u, REBASE_IMMEDIATE_MASK = 0x0Fu };
236 
247 };
248 
249 enum BindType {
253 };
254 
259 };
260 
261 enum {
264 
267 };
268 
283 };
284 
285 enum {
290 };
291 
296 };
297 
298 enum {
299  // Constant masks for the "n_type" field in llvm::MachO::nlist and
300  // llvm::MachO::nlist_64
301  N_STAB = 0xe0,
302  N_PEXT = 0x10,
303  N_TYPE = 0x0e,
304  N_EXT = 0x01
305 };
306 
307 enum NListType : uint8_t {
308  // Constants for the "n_type & N_TYPE" llvm::MachO::nlist and
309  // llvm::MachO::nlist_64
310  N_UNDF = 0x0u,
311  N_ABS = 0x2u,
312  N_SECT = 0xeu,
313  N_PBUD = 0xcu,
314  N_INDR = 0xau
315 };
316 
318  // Constants for the "n_sect" field in llvm::MachO::nlist and
319  // llvm::MachO::nlist_64
320  NO_SECT = 0u,
321  MAX_SECT = 0xffu
322 };
323 
324 enum {
325  // Constant masks for the "n_desc" field in llvm::MachO::nlist and
326  // llvm::MachO::nlist_64
327  // The low 3 bits are the for the REFERENCE_TYPE.
335  // Flag bits (some overlap with the library ordinal bits).
336  N_ARM_THUMB_DEF = 0x0008u,
338  N_NO_DEAD_STRIP = 0x0020u,
339  N_WEAK_REF = 0x0040u,
340  N_WEAK_DEF = 0x0080u,
341  N_SYMBOL_RESOLVER = 0x0100u,
342  N_ALT_ENTRY = 0x0200u,
343  N_COLD_FUNC = 0x0400u,
344  // For undefined symbols coming from libraries, see GET_LIBRARY_ORDINAL()
345  // as these are in the top 8 bits.
350 };
351 
352 enum StabType {
353  // Constant values for the "n_type" field in llvm::MachO::nlist and
354  // llvm::MachO::nlist_64 when "(n_type & N_STAB) != 0"
355  N_GSYM = 0x20u,
356  N_FNAME = 0x22u,
357  N_FUN = 0x24u,
358  N_STSYM = 0x26u,
359  N_LCSYM = 0x28u,
360  N_BNSYM = 0x2Eu,
361  N_PC = 0x30u,
362  N_AST = 0x32u,
363  N_OPT = 0x3Cu,
364  N_RSYM = 0x40u,
365  N_SLINE = 0x44u,
366  N_ENSYM = 0x4Eu,
367  N_SSYM = 0x60u,
368  N_SO = 0x64u,
369  N_OSO = 0x66u,
370  N_LSYM = 0x80u,
371  N_BINCL = 0x82u,
372  N_SOL = 0x84u,
373  N_PARAMS = 0x86u,
374  N_VERSION = 0x88u,
375  N_OLEVEL = 0x8Au,
376  N_PSYM = 0xA0u,
377  N_EINCL = 0xA2u,
378  N_ENTRY = 0xA4u,
379  N_LBRAC = 0xC0u,
380  N_EXCL = 0xC2u,
381  N_RBRAC = 0xE0u,
382  N_BCOMM = 0xE2u,
383  N_ECOMM = 0xE4u,
384  N_ECOML = 0xE8u,
385  N_LENG = 0xFEu
386 };
387 
388 enum : uint32_t {
389  // Constant values for the r_symbolnum field in an
390  // llvm::MachO::relocation_info structure when r_extern is 0.
391  R_ABS = 0,
392 
393  // Constant bits for the r_address field in an
394  // llvm::MachO::relocation_info structure.
395  R_SCATTERED = 0x80000000
396 };
397 
399  // Constant values for the r_type field in an
400  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
401  // structure.
409 
410  // Constant values for the r_type field in a PowerPC architecture
411  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
412  // structure.
429 
430  // Constant values for the r_type field in an ARM architecture
431  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
432  // structure.
440  ARM_THUMB_32BIT_BRANCH = 7, // obsolete
443 
444  // Constant values for the r_type field in an ARM64 architecture
445  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
446  // structure.
447 
448  // For pointers.
450  // Must be followed by an ARM64_RELOC_UNSIGNED
452  // A B/BL instruction with 26-bit displacement.
454  // PC-rel distance to page of target.
456  // Offset within page, scaled by r_length.
458  // PC-rel distance to page of GOT slot.
460  // Offset within page of GOT slot, scaled by r_length.
462  // For pointers to GOT slots.
464  // PC-rel distance to page of TLVP slot.
466  // Offset within page of TLVP slot, scaled by r_length.
468  // Must be followed by ARM64_RELOC_PAGE21 or ARM64_RELOC_PAGEOFF12.
470 
471  // Constant values for the r_type field in an x86_64 architecture
472  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
473  // structure
484 };
485 
486 // Values for segment_command.initprot.
487 // From <mach/vm_prot.h>
488 enum { VM_PROT_READ = 0x1, VM_PROT_WRITE = 0x2, VM_PROT_EXECUTE = 0x4 };
489 
490 // Values for platform field in build_version_command.
502 };
503 
504 // Values for tools enum in build_tool_version.
505 enum { TOOL_CLANG = 1, TOOL_SWIFT = 2, TOOL_LD = 3 };
506 
507 // Structs from <mach-o/loader.h>
508 
509 struct mach_header {
517 };
518 
528 };
529 
530 struct load_command {
533 };
534 
538  char segname[16];
547 };
548 
552  char segname[16];
553  uint64_t vmaddr;
554  uint64_t vmsize;
555  uint64_t fileoff;
556  uint64_t filesize;
561 };
562 
563 struct section {
564  char sectname[16];
565  char segname[16];
575 };
576 
577 struct section_64 {
578  char sectname[16];
579  char segname[16];
580  uint64_t addr;
581  uint64_t size;
590 };
591 
592 inline bool isVirtualSection(uint8_t type) {
593  return (type == MachO::S_ZEROFILL || type == MachO::S_GB_ZEROFILL ||
595 }
596 
597 struct fvmlib {
601 };
602 
603 // The fvmlib_command is obsolete and no longer supported.
607  struct fvmlib fvmlib;
608 };
609 
610 struct dylib {
615 };
616 
620  struct dylib dylib;
621 };
622 
627 };
628 
633 };
634 
639 };
640 
645 };
646 
647 // The prebound_dylib_command is obsolete and no longer supported.
654 };
655 
660 };
661 
665 };
666 
678 };
679 
683  uint64_t init_address;
684  uint64_t init_module;
685  uint64_t reserved1;
686  uint64_t reserved2;
687  uint64_t reserved3;
688  uint64_t reserved4;
689  uint64_t reserved5;
690  uint64_t reserved6;
691 };
692 
700 };
701 
723 };
724 
728 };
729 
730 struct dylib_module {
744 };
745 
760 };
761 
763  uint32_t isym : 24, flags : 8;
764 };
765 
766 // The twolevel_hints_command is obsolete and no longer supported.
772 };
773 
774 // The twolevel_hints_command is obsolete and no longer supported.
777 };
778 
779 // The prebind_cksum_command is obsolete and no longer supported.
784 };
785 
786 struct uuid_command {
789  uint8_t uuid[16];
790 };
791 
796 };
797 
803 };
804 
809 };
810 
814  uint64_t version;
815 };
816 
823 };
824 
832 };
833 
835  uint32_t cmd; // LC_VERSION_MIN_MACOSX or
836  // LC_VERSION_MIN_IPHONEOS
837  uint32_t cmdsize; // sizeof(struct version_min_command)
838  uint32_t version; // X.Y.Z is encoded in nibbles xxxx.yy.zz
839  uint32_t sdk; // X.Y.Z is encoded in nibbles xxxx.yy.zz
840 };
841 
842 struct note_command {
843  uint32_t cmd; // LC_NOTE
844  uint32_t cmdsize; // sizeof(struct note_command)
845  char data_owner[16]; // owner name for this LC_NOTE
846  uint64_t offset; // file offset of this data
847  uint64_t size; // length of data region
848 };
849 
851  uint32_t tool; // enum for the tool
852  uint32_t version; // version of the tool
853 };
854 
856  uint32_t cmd; // LC_BUILD_VERSION
857  uint32_t cmdsize; // sizeof(struct build_version_command) +
858  // ntools * sizeof(struct build_tool_version)
859  uint32_t platform; // platform
860  uint32_t minos; // X.Y.Z is encoded in nibbles xxxx.yy.zz
861  uint32_t sdk; // X.Y.Z is encoded in nibbles xxxx.yy.zz
862  uint32_t ntools; // number of tool entries following this
863 };
864 
878 };
879 
884 };
885 
886 // The symseg_command is obsolete and no longer supported.
892 };
893 
894 // The ident_command is obsolete and no longer supported.
898 };
899 
900 // The fvmfile_command is obsolete and no longer supported.
906 };
907 
912 };
913 
915  uint64_t thunk;
916  uint64_t key;
917  uint64_t offset;
918 };
919 
921  uintptr_t thunk;
922  uintptr_t key;
923  uintptr_t offset;
924 };
925 
929  uint64_t entryoff;
930  uint64_t stacksize;
931 };
932 
933 // Structs from <mach-o/fat.h>
934 struct fat_header {
937 };
938 
939 struct fat_arch {
945 };
946 
947 struct fat_arch_64 {
950  uint64_t offset;
951  uint64_t size;
954 };
955 
956 // Structs from <mach-o/reloc.h>
958  int32_t r_address;
960  r_type : 4;
961 };
962 
964 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN)
965  uint32_t r_scattered : 1, r_pcrel : 1, r_length : 2, r_type : 4,
966  r_address : 24;
967 #else
968  uint32_t r_address : 24, r_type : 4, r_length : 2, r_pcrel : 1,
970 #endif
971  int32_t r_value;
972 };
973 
974 // Structs NOT from <mach-o/reloc.h>, but that make LLVM's life easier
977 };
978 
979 // Structs from <mach-o/nlist.h>
980 struct nlist_base {
982  uint8_t n_type;
983  uint8_t n_sect;
985 };
986 
987 struct nlist {
989  uint8_t n_type;
990  uint8_t n_sect;
991  int16_t n_desc;
993 };
994 
995 struct nlist_64 {
997  uint8_t n_type;
998  uint8_t n_sect;
1000  uint64_t n_value;
1001 };
1002 
1003 // Byte order swapping functions for MachO structs
1004 
1005 inline void swapStruct(fat_header &mh) {
1008 }
1009 
1010 inline void swapStruct(fat_arch &mh) {
1016 }
1017 
1018 inline void swapStruct(fat_arch_64 &mh) {
1025 }
1026 
1027 inline void swapStruct(mach_header &mh) {
1035 }
1036 
1037 inline void swapStruct(mach_header_64 &H) {
1038  sys::swapByteOrder(H.magic);
1039  sys::swapByteOrder(H.cputype);
1040  sys::swapByteOrder(H.cpusubtype);
1041  sys::swapByteOrder(H.filetype);
1042  sys::swapByteOrder(H.ncmds);
1043  sys::swapByteOrder(H.sizeofcmds);
1044  sys::swapByteOrder(H.flags);
1045  sys::swapByteOrder(H.reserved);
1046 }
1047 
1048 inline void swapStruct(load_command &lc) {
1049  sys::swapByteOrder(lc.cmd);
1051 }
1052 
1053 inline void swapStruct(symtab_command &lc) {
1054  sys::swapByteOrder(lc.cmd);
1060 }
1061 
1062 inline void swapStruct(segment_command_64 &seg) {
1063  sys::swapByteOrder(seg.cmd);
1073 }
1074 
1075 inline void swapStruct(segment_command &seg) {
1076  sys::swapByteOrder(seg.cmd);
1086 }
1087 
1088 inline void swapStruct(section_64 &sect) {
1089  sys::swapByteOrder(sect.addr);
1090  sys::swapByteOrder(sect.size);
1091  sys::swapByteOrder(sect.offset);
1092  sys::swapByteOrder(sect.align);
1093  sys::swapByteOrder(sect.reloff);
1094  sys::swapByteOrder(sect.nreloc);
1095  sys::swapByteOrder(sect.flags);
1098 }
1099 
1100 inline void swapStruct(section &sect) {
1101  sys::swapByteOrder(sect.addr);
1102  sys::swapByteOrder(sect.size);
1103  sys::swapByteOrder(sect.offset);
1104  sys::swapByteOrder(sect.align);
1105  sys::swapByteOrder(sect.reloff);
1106  sys::swapByteOrder(sect.nreloc);
1107  sys::swapByteOrder(sect.flags);
1110 }
1111 
1113  sys::swapByteOrder(info.cmd);
1114  sys::swapByteOrder(info.cmdsize);
1115  sys::swapByteOrder(info.rebase_off);
1116  sys::swapByteOrder(info.rebase_size);
1117  sys::swapByteOrder(info.bind_off);
1118  sys::swapByteOrder(info.bind_size);
1119  sys::swapByteOrder(info.weak_bind_off);
1120  sys::swapByteOrder(info.weak_bind_size);
1121  sys::swapByteOrder(info.lazy_bind_off);
1122  sys::swapByteOrder(info.lazy_bind_size);
1123  sys::swapByteOrder(info.export_off);
1124  sys::swapByteOrder(info.export_size);
1125 }
1126 
1127 inline void swapStruct(dylib_command &d) {
1128  sys::swapByteOrder(d.cmd);
1129  sys::swapByteOrder(d.cmdsize);
1130  sys::swapByteOrder(d.dylib.name);
1131  sys::swapByteOrder(d.dylib.timestamp);
1132  sys::swapByteOrder(d.dylib.current_version);
1133  sys::swapByteOrder(d.dylib.compatibility_version);
1134 }
1135 
1137  sys::swapByteOrder(s.cmd);
1138  sys::swapByteOrder(s.cmdsize);
1139  sys::swapByteOrder(s.umbrella);
1140 }
1141 
1143  sys::swapByteOrder(s.cmd);
1144  sys::swapByteOrder(s.cmdsize);
1145  sys::swapByteOrder(s.sub_umbrella);
1146 }
1147 
1149  sys::swapByteOrder(s.cmd);
1150  sys::swapByteOrder(s.cmdsize);
1151  sys::swapByteOrder(s.sub_library);
1152 }
1153 
1155  sys::swapByteOrder(s.cmd);
1156  sys::swapByteOrder(s.cmdsize);
1157  sys::swapByteOrder(s.client);
1158 }
1159 
1160 inline void swapStruct(routines_command &r) {
1171 }
1172 
1184 }
1185 
1186 inline void swapStruct(thread_command &t) {
1187  sys::swapByteOrder(t.cmd);
1188  sys::swapByteOrder(t.cmdsize);
1189 }
1190 
1192  sys::swapByteOrder(d.cmd);
1193  sys::swapByteOrder(d.cmdsize);
1194  sys::swapByteOrder(d.name);
1195 }
1196 
1197 inline void swapStruct(uuid_command &u) {
1200 }
1201 
1202 inline void swapStruct(rpath_command &r) {
1206 }
1207 
1209  sys::swapByteOrder(s.cmd);
1210  sys::swapByteOrder(s.cmdsize);
1211  sys::swapByteOrder(s.version);
1212 }
1213 
1215  sys::swapByteOrder(e.cmd);
1216  sys::swapByteOrder(e.cmdsize);
1217  sys::swapByteOrder(e.entryoff);
1218  sys::swapByteOrder(e.stacksize);
1219 }
1220 
1222  sys::swapByteOrder(e.cmd);
1223  sys::swapByteOrder(e.cmdsize);
1224  sys::swapByteOrder(e.cryptoff);
1225  sys::swapByteOrder(e.cryptsize);
1226  sys::swapByteOrder(e.cryptid);
1227 }
1228 
1230  sys::swapByteOrder(e.cmd);
1231  sys::swapByteOrder(e.cmdsize);
1232  sys::swapByteOrder(e.cryptoff);
1233  sys::swapByteOrder(e.cryptsize);
1234  sys::swapByteOrder(e.cryptid);
1235  sys::swapByteOrder(e.pad);
1236 }
1237 
1238 inline void swapStruct(dysymtab_command &dst) {
1239  sys::swapByteOrder(dst.cmd);
1248  sys::swapByteOrder(dst.ntoc);
1259 }
1260 
1261 inline void swapStruct(any_relocation_info &reloc) {
1262  sys::swapByteOrder(reloc.r_word0);
1263  sys::swapByteOrder(reloc.r_word1);
1264 }
1265 
1266 inline void swapStruct(nlist_base &S) {
1267  sys::swapByteOrder(S.n_strx);
1268  sys::swapByteOrder(S.n_desc);
1269 }
1270 
1271 inline void swapStruct(nlist &sym) {
1275 }
1276 
1277 inline void swapStruct(nlist_64 &sym) {
1281 }
1282 
1284  sys::swapByteOrder(C.cmd);
1285  sys::swapByteOrder(C.cmdsize);
1286  sys::swapByteOrder(C.dataoff);
1287  sys::swapByteOrder(C.datasize);
1288 }
1289 
1291  sys::swapByteOrder(C.cmd);
1292  sys::swapByteOrder(C.cmdsize);
1293  sys::swapByteOrder(C.count);
1294 }
1295 
1297  sys::swapByteOrder(C.cmd);
1298  sys::swapByteOrder(C.cmdsize);
1299  sys::swapByteOrder(C.version);
1300  sys::swapByteOrder(C.sdk);
1301 }
1302 
1303 inline void swapStruct(note_command &C) {
1304  sys::swapByteOrder(C.cmd);
1305  sys::swapByteOrder(C.cmdsize);
1306  sys::swapByteOrder(C.offset);
1307  sys::swapByteOrder(C.size);
1308 }
1309 
1311  sys::swapByteOrder(C.cmd);
1312  sys::swapByteOrder(C.cmdsize);
1313  sys::swapByteOrder(C.platform);
1314  sys::swapByteOrder(C.minos);
1315  sys::swapByteOrder(C.sdk);
1316  sys::swapByteOrder(C.ntools);
1317 }
1318 
1320  sys::swapByteOrder(C.tool);
1321  sys::swapByteOrder(C.version);
1322 }
1323 
1325  sys::swapByteOrder(C.offset);
1326  sys::swapByteOrder(C.length);
1327  sys::swapByteOrder(C.kind);
1328 }
1329 
1331 
1332 // The prebind_cksum_command is obsolete and no longer supported.
1334  sys::swapByteOrder(C.cmd);
1335  sys::swapByteOrder(C.cmdsize);
1336  sys::swapByteOrder(C.cksum);
1337 }
1338 
1339 // The twolevel_hints_command is obsolete and no longer supported.
1341  sys::swapByteOrder(C.cmd);
1342  sys::swapByteOrder(C.cmdsize);
1343  sys::swapByteOrder(C.offset);
1344  sys::swapByteOrder(C.nhints);
1345 }
1346 
1347 // The prebound_dylib_command is obsolete and no longer supported.
1349  sys::swapByteOrder(C.cmd);
1350  sys::swapByteOrder(C.cmdsize);
1351  sys::swapByteOrder(C.name);
1352  sys::swapByteOrder(C.nmodules);
1353  sys::swapByteOrder(C.linked_modules);
1354 }
1355 
1356 // The fvmfile_command is obsolete and no longer supported.
1358  sys::swapByteOrder(C.cmd);
1359  sys::swapByteOrder(C.cmdsize);
1360  sys::swapByteOrder(C.name);
1361  sys::swapByteOrder(C.header_addr);
1362 }
1363 
1364 // The symseg_command is obsolete and no longer supported.
1365 inline void swapStruct(symseg_command &C) {
1366  sys::swapByteOrder(C.cmd);
1367  sys::swapByteOrder(C.cmdsize);
1368  sys::swapByteOrder(C.offset);
1369  sys::swapByteOrder(C.size);
1370 }
1371 
1372 // The ident_command is obsolete and no longer supported.
1373 inline void swapStruct(ident_command &C) {
1374  sys::swapByteOrder(C.cmd);
1375  sys::swapByteOrder(C.cmdsize);
1376 }
1377 
1378 inline void swapStruct(fvmlib &C) {
1379  sys::swapByteOrder(C.name);
1380  sys::swapByteOrder(C.minor_version);
1381  sys::swapByteOrder(C.header_addr);
1382 }
1383 
1384 // The fvmlib_command is obsolete and no longer supported.
1385 inline void swapStruct(fvmlib_command &C) {
1386  sys::swapByteOrder(C.cmd);
1387  sys::swapByteOrder(C.cmdsize);
1388  swapStruct(C.fvmlib);
1389 }
1390 
1391 // Get/Set functions from <mach-o/nlist.h>
1392 
1394  return (((n_desc) >> 8u) & 0xffu);
1395 }
1396 
1397 inline void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal) {
1398  n_desc = (((n_desc)&0x00ff) | (((ordinal)&0xff) << 8));
1399 }
1400 
1401 inline uint8_t GET_COMM_ALIGN(uint16_t n_desc) {
1402  return (n_desc >> 8u) & 0x0fu;
1403 }
1404 
1405 inline void SET_COMM_ALIGN(uint16_t &n_desc, uint8_t align) {
1406  n_desc = ((n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u));
1407 }
1408 
1409 // Enums from <mach/machine.h>
1410 enum : uint32_t {
1411  // Capability bits used in the definition of cpu_type.
1412  CPU_ARCH_MASK = 0xff000000, // Mask for architecture bits
1413  CPU_ARCH_ABI64 = 0x01000000, // 64 bit ABI
1414  CPU_ARCH_ABI64_32 = 0x02000000, // ILP32 ABI on 64-bit hardware
1415 };
1416 
1417 // Constants for the cputype field.
1418 enum CPUType {
1423  /* CPU_TYPE_MIPS = 8, */
1424  CPU_TYPE_MC98000 = 10, // Old Motorola PowerPC
1431 };
1432 
1433 enum : uint32_t {
1434  // Capability bits used in the definition of cpusubtype.
1435  CPU_SUBTYPE_MASK = 0xff000000, // Mask for architecture bits
1436  CPU_SUBTYPE_LIB64 = 0x80000000, // 64 bit libraries
1437 
1438  // Special CPU subtype constants.
1440 };
1441 
1442 // Constants for the cpusubtype field.
1465 
1470 };
1471 inline int CPU_SUBTYPE_INTEL(int Family, int Model) {
1472  return Family | (Model << 4);
1473 }
1475  return ((int)ST) & 0x0f;
1476 }
1477 inline int CPU_SUBTYPE_INTEL_MODEL(CPUSubTypeX86 ST) { return ((int)ST) >> 4; }
1479 
1488  // unused ARM_V7F = 10,
1494 };
1495 
1500 };
1501 
1503 
1505 
1520 
1523 };
1524 
1527 
1545 };
1546 
1548  uint64_t rax;
1549  uint64_t rbx;
1550  uint64_t rcx;
1551  uint64_t rdx;
1552  uint64_t rdi;
1553  uint64_t rsi;
1554  uint64_t rbp;
1555  uint64_t rsp;
1556  uint64_t r8;
1557  uint64_t r9;
1558  uint64_t r10;
1559  uint64_t r11;
1560  uint64_t r12;
1561  uint64_t r13;
1562  uint64_t r14;
1563  uint64_t r15;
1564  uint64_t rip;
1565  uint64_t rflags;
1566  uint64_t cs;
1567  uint64_t fs;
1568  uint64_t gs;
1569 };
1570 
1575 };
1576 
1582 };
1583 
1585  unsigned short invalid : 1, denorm : 1, zdiv : 1, ovrfl : 1, undfl : 1,
1586  precis : 1, : 2, pc : 2, rc : 2, : 1, : 3;
1587 };
1588 
1589 struct fp_status_t {
1590  unsigned short invalid : 1, denorm : 1, zdiv : 1, ovrfl : 1, undfl : 1,
1591  precis : 1, stkflt : 1, errsumm : 1, c0 : 1, c1 : 1, c2 : 1, tos : 3,
1592  c3 : 1, busy : 1;
1593 };
1594 
1595 struct mmst_reg_t {
1596  char mmst_reg[10];
1597  char mmst_rsrv[6];
1598 };
1599 
1600 struct xmm_reg_t {
1601  char xmm_reg[16];
1602 };
1603 
1605  int32_t fpu_reserved[2];
1608  uint8_t fpu_ftw;
1609  uint8_t fpu_rsrv1;
1643  char fpu_rsrv4[6 * 16];
1645 };
1646 
1651  uint64_t faultvaddr;
1652 };
1653 
1655  sys::swapByteOrder(x.eax);
1656  sys::swapByteOrder(x.ebx);
1657  sys::swapByteOrder(x.ecx);
1658  sys::swapByteOrder(x.edx);
1659  sys::swapByteOrder(x.edi);
1660  sys::swapByteOrder(x.esi);
1661  sys::swapByteOrder(x.ebp);
1662  sys::swapByteOrder(x.esp);
1663  sys::swapByteOrder(x.ss);
1664  sys::swapByteOrder(x.eflags);
1665  sys::swapByteOrder(x.eip);
1666  sys::swapByteOrder(x.cs);
1667  sys::swapByteOrder(x.ds);
1668  sys::swapByteOrder(x.es);
1669  sys::swapByteOrder(x.fs);
1670  sys::swapByteOrder(x.gs);
1671 }
1672 
1674  sys::swapByteOrder(x.rax);
1675  sys::swapByteOrder(x.rbx);
1676  sys::swapByteOrder(x.rcx);
1677  sys::swapByteOrder(x.rdx);
1678  sys::swapByteOrder(x.rdi);
1679  sys::swapByteOrder(x.rsi);
1680  sys::swapByteOrder(x.rbp);
1681  sys::swapByteOrder(x.rsp);
1682  sys::swapByteOrder(x.r8);
1683  sys::swapByteOrder(x.r9);
1684  sys::swapByteOrder(x.r10);
1685  sys::swapByteOrder(x.r11);
1686  sys::swapByteOrder(x.r12);
1687  sys::swapByteOrder(x.r13);
1688  sys::swapByteOrder(x.r14);
1689  sys::swapByteOrder(x.r15);
1690  sys::swapByteOrder(x.rip);
1691  sys::swapByteOrder(x.rflags);
1692  sys::swapByteOrder(x.cs);
1693  sys::swapByteOrder(x.fs);
1694  sys::swapByteOrder(x.gs);
1695 }
1696 
1698  sys::swapByteOrder(x.fpu_reserved[0]);
1699  sys::swapByteOrder(x.fpu_reserved[1]);
1700  // TODO swap: fp_control_t fpu_fcw;
1701  // TODO swap: fp_status_t fpu_fsw;
1702  sys::swapByteOrder(x.fpu_fop);
1703  sys::swapByteOrder(x.fpu_ip);
1704  sys::swapByteOrder(x.fpu_cs);
1705  sys::swapByteOrder(x.fpu_rsrv2);
1706  sys::swapByteOrder(x.fpu_dp);
1707  sys::swapByteOrder(x.fpu_ds);
1708  sys::swapByteOrder(x.fpu_rsrv3);
1709  sys::swapByteOrder(x.fpu_mxcsr);
1710  sys::swapByteOrder(x.fpu_mxcsrmask);
1711  sys::swapByteOrder(x.fpu_reserved1);
1712 }
1713 
1715  sys::swapByteOrder(x.trapno);
1716  sys::swapByteOrder(x.cpu);
1717  sys::swapByteOrder(x.err);
1718  sys::swapByteOrder(x.faultvaddr);
1719 }
1720 
1724 };
1725 
1728  union {
1731  } uts;
1732 };
1733 
1736  union {
1738  } ufs;
1739 };
1740 
1743  union {
1745  } ues;
1746 };
1747 
1749  sys::swapByteOrder(x.flavor);
1750  sys::swapByteOrder(x.count);
1751 }
1752 
1766 };
1767 
1769  swapStruct(x.tsh);
1770  if (x.tsh.flavor == x86_THREAD_STATE64)
1771  swapStruct(x.uts.ts64);
1772 }
1773 
1775  swapStruct(x.fsh);
1776  if (x.fsh.flavor == x86_FLOAT_STATE64)
1777  swapStruct(x.ufs.fs64);
1778 }
1779 
1781  swapStruct(x.esh);
1782  if (x.esh.flavor == x86_EXCEPTION_STATE64)
1783  swapStruct(x.ues.es64);
1784 }
1785 
1787  sizeof(x86_thread_state32_t) / sizeof(uint32_t);
1788 
1790  sizeof(x86_thread_state64_t) / sizeof(uint32_t);
1792  sizeof(x86_float_state64_t) / sizeof(uint32_t);
1794  sizeof(x86_exception_state64_t) / sizeof(uint32_t);
1795 
1797  sizeof(x86_thread_state_t) / sizeof(uint32_t);
1799  sizeof(x86_float_state_t) / sizeof(uint32_t);
1801  sizeof(x86_exception_state_t) / sizeof(uint32_t);
1802 
1809 };
1810 
1812  for (int i = 0; i < 13; i++)
1813  sys::swapByteOrder(x.r[i]);
1814  sys::swapByteOrder(x.sp);
1815  sys::swapByteOrder(x.lr);
1816  sys::swapByteOrder(x.pc);
1817  sys::swapByteOrder(x.cpsr);
1818 }
1819 
1821  uint64_t x[29];
1822  uint64_t fp;
1823  uint64_t lr;
1824  uint64_t sp;
1825  uint64_t pc;
1828 };
1829 
1831  for (int i = 0; i < 29; i++)
1832  sys::swapByteOrder(x.x[i]);
1833  sys::swapByteOrder(x.fp);
1834  sys::swapByteOrder(x.lr);
1835  sys::swapByteOrder(x.sp);
1836  sys::swapByteOrder(x.pc);
1837  sys::swapByteOrder(x.cpsr);
1838 }
1839 
1843 };
1844 
1847  union {
1849  } uts;
1850 };
1851 
1853  sys::swapByteOrder(x.flavor);
1854  sys::swapByteOrder(x.count);
1855 }
1856 
1865 };
1866 
1868  swapStruct(x.tsh);
1869  if (x.tsh.flavor == ARM_THREAD_STATE)
1870  swapStruct(x.uts.ts32);
1871 }
1872 
1874  sizeof(arm_thread_state32_t) / sizeof(uint32_t);
1875 
1877  sizeof(arm_thread_state64_t) / sizeof(uint32_t);
1878 
1920 };
1921 
1923  sys::swapByteOrder(x.srr0);
1924  sys::swapByteOrder(x.srr1);
1925  sys::swapByteOrder(x.r0);
1926  sys::swapByteOrder(x.r1);
1927  sys::swapByteOrder(x.r2);
1928  sys::swapByteOrder(x.r3);
1929  sys::swapByteOrder(x.r4);
1930  sys::swapByteOrder(x.r5);
1931  sys::swapByteOrder(x.r6);
1932  sys::swapByteOrder(x.r7);
1933  sys::swapByteOrder(x.r8);
1934  sys::swapByteOrder(x.r9);
1935  sys::swapByteOrder(x.r10);
1936  sys::swapByteOrder(x.r11);
1937  sys::swapByteOrder(x.r12);
1938  sys::swapByteOrder(x.r13);
1939  sys::swapByteOrder(x.r14);
1940  sys::swapByteOrder(x.r15);
1941  sys::swapByteOrder(x.r16);
1942  sys::swapByteOrder(x.r17);
1943  sys::swapByteOrder(x.r18);
1944  sys::swapByteOrder(x.r19);
1945  sys::swapByteOrder(x.r20);
1946  sys::swapByteOrder(x.r21);
1947  sys::swapByteOrder(x.r22);
1948  sys::swapByteOrder(x.r23);
1949  sys::swapByteOrder(x.r24);
1950  sys::swapByteOrder(x.r25);
1951  sys::swapByteOrder(x.r26);
1952  sys::swapByteOrder(x.r27);
1953  sys::swapByteOrder(x.r28);
1954  sys::swapByteOrder(x.r29);
1955  sys::swapByteOrder(x.r30);
1956  sys::swapByteOrder(x.r31);
1957  sys::swapByteOrder(x.ct);
1958  sys::swapByteOrder(x.xer);
1959  sys::swapByteOrder(x.lr);
1960  sys::swapByteOrder(x.ctr);
1961  sys::swapByteOrder(x.mq);
1962  sys::swapByteOrder(x.vrsave);
1963 }
1964 
1968 };
1969 
1972  union {
1974  } uts;
1975 };
1976 
1978  sys::swapByteOrder(x.flavor);
1979  sys::swapByteOrder(x.count);
1980 }
1981 
1990 };
1991 
1993  swapStruct(x.tsh);
1994  if (x.tsh.flavor == PPC_THREAD_STATE)
1995  swapStruct(x.uts.ts32);
1996 }
1997 
1999  sizeof(ppc_thread_state32_t) / sizeof(uint32_t);
2000 
2001 // Define a union of all load command structs
2002 #define LOAD_COMMAND_STRUCT(LCStruct) LCStruct LCStruct##_data;
2003 
2005 union alignas(4) macho_load_command {
2006 #include "llvm/BinaryFormat/MachO.def"
2007 };
2009 
2010 /* code signing attributes of a process */
2011 
2013  CS_VALID = 0x00000001, /* dynamically valid */
2014  CS_ADHOC = 0x00000002, /* ad hoc signed */
2015  CS_GET_TASK_ALLOW = 0x00000004, /* has get-task-allow entitlement */
2016  CS_INSTALLER = 0x00000008, /* has installer entitlement */
2017 
2019  0x00000010, /* Library Validation required by Hardened System Policy */
2020  CS_INVALID_ALLOWED = 0x00000020, /* (macOS Only) Page invalidation allowed by
2021  task port policy */
2022 
2023  CS_HARD = 0x00000100, /* don't load invalid pages */
2024  CS_KILL = 0x00000200, /* kill process if it becomes invalid */
2025  CS_CHECK_EXPIRATION = 0x00000400, /* force expiration checking */
2026  CS_RESTRICT = 0x00000800, /* tell dyld to treat restricted */
2027 
2028  CS_ENFORCEMENT = 0x00001000, /* require enforcement */
2029  CS_REQUIRE_LV = 0x00002000, /* require library validation */
2031  0x00004000, /* code signature permits restricted entitlements */
2033  0x00008000, /* has com.apple.rootless.restricted-nvram-variables.heritable
2034  entitlement */
2035 
2036  CS_RUNTIME = 0x00010000, /* Apply hardened runtime policies */
2037  CS_LINKER_SIGNED = 0x00020000, /* Automatically signed by the linker */
2038 
2042 
2043  CS_EXEC_SET_HARD = 0x00100000, /* set CS_HARD on any exec'ed process */
2044  CS_EXEC_SET_KILL = 0x00200000, /* set CS_KILL on any exec'ed process */
2046  0x00400000, /* set CS_ENFORCEMENT on any exec'ed process */
2048  0x00800000, /* set CS_INSTALLER on any exec'ed process */
2049 
2050  CS_KILLED = 0x01000000, /* was killed by kernel for invalidity */
2052  0x02000000, /* dyld used to load this is a platform binary */
2053  CS_PLATFORM_BINARY = 0x04000000, /* this is a platform binary */
2055  0x08000000, /* platform binary by the fact of path (osx only) */
2056 
2057  CS_DEBUGGED = 0x10000000, /* process is currently or has previously been
2058  debugged and allowed to run with invalid pages */
2059  CS_SIGNED = 0x20000000, /* process has a signature (may have gone invalid) */
2061  0x40000000, /* code is dev signed, cannot be loaded into prod signed code
2062  (will go away with rdar://problem/28322552) */
2064  0x80000000, /* has Data Vault controller entitlement */
2065 
2068 };
2069 
2070 /* executable segment flags */
2071 
2073 
2074  CS_EXECSEG_MAIN_BINARY = 0x1, /* executable segment denotes main binary */
2075  CS_EXECSEG_ALLOW_UNSIGNED = 0x10, /* allow unsigned pages (for debugging) */
2076  CS_EXECSEG_DEBUGGER = 0x20, /* main binary is debugger */
2077  CS_EXECSEG_JIT = 0x40, /* JIT enabled */
2078  CS_EXECSEG_SKIP_LV = 0x80, /* OBSOLETE: skip library validation */
2079  CS_EXECSEG_CAN_LOAD_CDHASH = 0x100, /* can bless cdhash for execution */
2080  CS_EXECSEG_CAN_EXEC_CDHASH = 0x200, /* can execute blessed cdhash */
2081 
2082 };
2083 
2084 /* Magic numbers used by Code Signing */
2085 
2087  CSMAGIC_REQUIREMENT = 0xfade0c00, /* single Requirement blob */
2089  0xfade0c01, /* Requirements vector (internal requirements) */
2090  CSMAGIC_CODEDIRECTORY = 0xfade0c02, /* CodeDirectory blob */
2091  CSMAGIC_EMBEDDED_SIGNATURE = 0xfade0cc0, /* embedded form of signature data */
2092  CSMAGIC_EMBEDDED_SIGNATURE_OLD = 0xfade0b02, /* XXX */
2093  CSMAGIC_EMBEDDED_ENTITLEMENTS = 0xfade7171, /* embedded entitlements */
2095  0xfade0cc1, /* multi-arch collection of embedded signatures */
2096  CSMAGIC_BLOBWRAPPER = 0xfade0b01, /* CMS Signature, among other things */
2097 
2104 
2105  CSSLOT_CODEDIRECTORY = 0, /* slot index for CodeDirectory */
2111 
2113  0x1000, /* first alternate CodeDirectory, if any */
2114  CSSLOT_ALTERNATE_CODEDIRECTORY_MAX = 5, /* max number of alternate CD slots */
2117  CSSLOT_ALTERNATE_CODEDIRECTORY_MAX, /* one past the last */
2118 
2119  CSSLOT_SIGNATURESLOT = 0x10000, /* CMS Signature */
2122 
2123  CSTYPE_INDEX_REQUIREMENTS = 0x00000002, /* compat with amfi */
2124  CSTYPE_INDEX_ENTITLEMENTS = 0x00000005, /* compat with amfi */
2125 
2130 
2134 
2135  CS_CDHASH_LEN = 20, /* always - larger hashes are truncated */
2136  CS_HASH_MAX_SIZE = 48, /* max size of the hash we'll support */
2137 
2138  /*
2139  * Currently only to support Legacy VPN plugins, and Mac App Store
2140  * but intended to replace all the various platform code, dev code etc. bits.
2141  */
2145 
2149 };
2150 
2152  uint32_t magic; /* magic number (CSMAGIC_CODEDIRECTORY) */
2153  uint32_t length; /* total length of CodeDirectory blob */
2154  uint32_t version; /* compatibility version */
2155  uint32_t flags; /* setup and mode flags */
2156  uint32_t hashOffset; /* offset of hash slot element at index zero */
2157  uint32_t identOffset; /* offset of identifier string */
2158  uint32_t nSpecialSlots; /* number of special hash slots */
2159  uint32_t nCodeSlots; /* number of ordinary (code) hash slots */
2160  uint32_t codeLimit; /* limit to main image signature range */
2161  uint8_t hashSize; /* size of each hash in bytes */
2162  uint8_t hashType; /* type of hash (cdHashType* constants) */
2163  uint8_t platform; /* platform identifier; zero if not platform binary */
2164  uint8_t pageSize; /* log2(page size in bytes); 0 => infinite */
2165  uint32_t spare2; /* unused (must be zero) */
2166 
2167  /* Version 0x20100 */
2168  uint32_t scatterOffset; /* offset of optional scatter vector */
2169 
2170  /* Version 0x20200 */
2171  uint32_t teamOffset; /* offset of optional team identifier */
2172 
2173  /* Version 0x20300 */
2174  uint32_t spare3; /* unused (must be zero) */
2175  uint64_t codeLimit64; /* limit to main image signature range, 64 bits */
2176 
2177  /* Version 0x20400 */
2178  uint64_t execSegBase; /* offset of executable segment */
2179  uint64_t execSegLimit; /* limit of executable segment */
2180  uint64_t execSegFlags; /* executable segment flags */
2181 };
2182 
2183 static_assert(sizeof(CS_CodeDirectory) == 88, "");
2184 
2186  uint32_t type; /* type of entry */
2187  uint32_t offset; /* offset of entry */
2188 };
2189 
2191  uint32_t magic; /* magic number */
2192  uint32_t length; /* total length of SuperBlob */
2193  uint32_t count; /* number of index entries following */
2194  /* followed by Blobs in no particular order as indicated by index offsets */
2195 };
2196 
2198  kSecCodeSignatureNoHash = 0, /* null value */
2199  kSecCodeSignatureHashSHA1 = 1, /* SHA-1 */
2200  kSecCodeSignatureHashSHA256 = 2, /* SHA-256 */
2202  3, /* SHA-256 truncated to first 20 bytes */
2203  kSecCodeSignatureHashSHA384 = 4, /* SHA-384 */
2204  kSecCodeSignatureHashSHA512 = 5, /* SHA-512 */
2205 };
2206 
2207 } // end namespace MachO
2208 } // end namespace llvm
2209 
2210 #endif
llvm::MachO::dylib
Definition: MachO.h:610
llvm::MachO::S_CSTRING_LITERALS
@ S_CSTRING_LITERALS
S_CSTRING_LITERALS - Section with literal C strings.
Definition: MachO.h:129
llvm::MachO::segment_command_64::flags
uint32_t flags
Definition: MachO.h:560
llvm::MachO::CSMAGIC_CODEDIRECTORY
@ CSMAGIC_CODEDIRECTORY
Definition: MachO.h:2090
llvm::MachO::build_tool_version::tool
uint32_t tool
Definition: MachO.h:851
llvm::MachO::CS_SUPPL_SIGNER_TYPE_UNKNOWN
@ CS_SUPPL_SIGNER_TYPE_UNKNOWN
Definition: MachO.h:2146
llvm::MachO::CS_INVALID_ALLOWED
@ CS_INVALID_ALLOWED
Definition: MachO.h:2020
llvm::MachO::tlv_descriptor_32::thunk
uint32_t thunk
Definition: MachO.h:909
i
i
Definition: README.txt:29
llvm::MachO::sub_library_command
Definition: MachO.h:641
llvm::MachO::segment_command_64::initprot
uint32_t initprot
Definition: MachO.h:558
llvm::MachO::PPC_THREAD_STATE_COUNT
const uint32_t PPC_THREAD_STATE_COUNT
Definition: MachO.h:1998
llvm::MachO::ARM64_RELOC_TLVP_LOAD_PAGEOFF12
@ ARM64_RELOC_TLVP_LOAD_PAGEOFF12
Definition: MachO.h:467
llvm::MachO::CS_HASH_MAX_SIZE
@ CS_HASH_MAX_SIZE
Definition: MachO.h:2136
llvm::MachO::encryption_info_command::cryptoff
uint32_t cryptoff
Definition: MachO.h:820
llvm::MachO::fat_arch_64::offset
uint64_t offset
Definition: MachO.h:950
llvm::MachO::version_min_command::sdk
uint32_t sdk
Definition: MachO.h:839
llvm::MachO::CPU_SUBTYPE_ARM_V5
@ CPU_SUBTYPE_ARM_V5
Definition: MachO.h:1484
llvm::MachO::BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
@ BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
Definition: MachO.h:271
llvm::MachO::x86_thread_state32_t
Definition: MachO.h:1528
llvm::MachO::CPUSubTypeX86
CPUSubTypeX86
Definition: MachO.h:1443
llvm::MachO::dysymtab_command::nextrel
uint32_t nextrel
Definition: MachO.h:720
LLVM_PACKED_END
#define LLVM_PACKED_END
Definition: Compiler.h:398
llvm::MachO::CS_FORCED_LV
@ CS_FORCED_LV
Definition: MachO.h:2018
llvm::MachO::sub_umbrella_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:637
llvm::MachO::PPC_RELOC_SECTDIFF
@ PPC_RELOC_SECTDIFF
Definition: MachO.h:421
llvm::MachO::fat_arch_64::reserved
uint32_t reserved
Definition: MachO.h:953
llvm::MachO::section
Definition: MachO.h:563
llvm::MachO::arm_thread_state64_t::cpsr
uint32_t cpsr
Definition: MachO.h:1826
llvm::MachO::CSSLOT_ALTERNATE_CODEDIRECTORY_MAX
@ CSSLOT_ALTERNATE_CODEDIRECTORY_MAX
Definition: MachO.h:2114
llvm::MachO::arm_thread_state_t::uts
union llvm::MachO::arm_thread_state_t::@141 uts
llvm::MachO::ARM64_RELOC_UNSIGNED
@ ARM64_RELOC_UNSIGNED
Definition: MachO.h:449
llvm::MachO::mach_header::magic
uint32_t magic
Definition: MachO.h:510
llvm::MachO::dylib::compatibility_version
uint32_t compatibility_version
Definition: MachO.h:614
llvm::MachO::x86_DEBUG_STATE64
@ x86_DEBUG_STATE64
Definition: MachO.h:1764
llvm::MachO::N_WEAK_REF
@ N_WEAK_REF
Definition: MachO.h:339
llvm::MachO::CS_DATAVAULT_CONTROLLER
@ CS_DATAVAULT_CONTROLLER
Definition: MachO.h:2063
llvm::MachO::PLATFORM_MACOS
@ PLATFORM_MACOS
Definition: MachO.h:492
llvm::MachO::scattered_relocation_info::r_pcrel
uint32_t r_pcrel
Definition: MachO.h:968
llvm::MachO::CPU_SUBTYPE_X86_ALL
@ CPU_SUBTYPE_X86_ALL
Definition: MachO.h:1466
llvm::MachO::thread_command::cmd
uint32_t cmd
Definition: MachO.h:663
llvm
Definition: AllocatorList.h:23
llvm::MachO::PLATFORM_WATCHOSSIMULATOR
@ PLATFORM_WATCHOSSIMULATOR
Definition: MachO.h:500
llvm::MachO::CS_SIGNER_TYPE_UNKNOWN
@ CS_SIGNER_TYPE_UNKNOWN
Definition: MachO.h:2142
llvm::MachO::MH_TWOLEVEL
@ MH_TWOLEVEL
Definition: MachO.h:66
llvm::MachO::scattered_relocation_info::r_type
uint32_t r_type
Definition: MachO.h:968
llvm::MachO::CS_CodeDirectory::execSegLimit
uint64_t execSegLimit
Definition: MachO.h:2179
llvm::MachO::prebound_dylib_command::name
uint32_t name
Definition: MachO.h:651
llvm::MachO::MH_BUNDLE
@ MH_BUNDLE
Definition: MachO.h:50
llvm::MachO::any_relocation_info
Definition: MachO.h:975
llvm::MachO::tlv_descriptor_32::offset
uint32_t offset
Definition: MachO.h:911
llvm::MachO::symseg_command::cmd
uint32_t cmd
Definition: MachO.h:888
llvm::MachO::routines_command_64::reserved5
uint64_t reserved5
Definition: MachO.h:689
llvm::MachO::MAX_LIBRARY_ORDINAL
@ MAX_LIBRARY_ORDINAL
Definition: MachO.h:347
llvm::MachO::BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
@ BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
Definition: MachO.h:281
llvm::MachO::routines_command_64::init_address
uint64_t init_address
Definition: MachO.h:683
llvm::MachO::relocation_info::r_length
uint32_t r_length
Definition: MachO.h:959
llvm::MachO::tlv_descriptor_64::thunk
uint64_t thunk
Definition: MachO.h:915
llvm::MachO::encryption_info_command::cryptsize
uint32_t cryptsize
Definition: MachO.h:821
llvm::MachO::source_version_command::version
uint64_t version
Definition: MachO.h:814
llvm::MachO::dylib_module_64::ilocalsym
uint32_t ilocalsym
Definition: MachO.h:752
LLVM_PACKED_START
#define LLVM_PACKED_START
Definition: Compiler.h:397
llvm::MachO::uuid_command::cmd
uint32_t cmd
Definition: MachO.h:787
llvm::MachO::sub_umbrella_command
Definition: MachO.h:635
llvm::MachO::data_in_code_entry::length
uint16_t length
Definition: MachO.h:807
llvm::MachO::data_in_code_entry::kind
uint16_t kind
Definition: MachO.h:808
llvm::MachO::R_SCATTERED
@ R_SCATTERED
Definition: MachO.h:395
llvm::MachO::MH_DYLIB_IN_CACHE
@ MH_DYLIB_IN_CACHE
Definition: MachO.h:87
llvm::MachO::x86_float_state64_t::fpu_fop
uint16_t fpu_fop
Definition: MachO.h:1610
llvm::MachO::x86_exception_state_t::es64
x86_exception_state64_t es64
Definition: MachO.h:1744
llvm::MachO::EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION
@ EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION
Definition: MachO.h:287
llvm::MachO::fp_control_t::denorm
unsigned short denorm
Definition: MachO.h:1585
llvm::MachO::CS_EXECSEG_MAIN_BINARY
@ CS_EXECSEG_MAIN_BINARY
Definition: MachO.h:2074
llvm::MachO::x86_float_state64_t::fpu_fsw
fp_status_t fpu_fsw
Definition: MachO.h:1607
llvm::MachO::MH_BINDATLOAD
@ MH_BINDATLOAD
Definition: MachO.h:62
llvm::sys::swapByteOrder
void swapByteOrder(T &Value)
Definition: SwapByteOrder.h:158
llvm::MachO::kSecCodeSignatureHashSHA512
@ kSecCodeSignatureHashSHA512
Definition: MachO.h:2204
llvm::MachO::CS_SUPPORTSSCATTER
@ CS_SUPPORTSSCATTER
Definition: MachO.h:2098
llvm::MachO::PPC_RELOC_HA16
@ PPC_RELOC_HA16
Definition: MachO.h:419
llvm::MachO::dylib_module::iextrel
uint32_t iextrel
Definition: MachO.h:738
llvm::MachO::encryption_info_command_64::cmdsize
uint32_t cmdsize
Definition: MachO.h:827
llvm::MachO::mach_header_64::flags
uint32_t flags
Definition: MachO.h:526
llvm::MachO::sub_umbrella_command::sub_umbrella
uint32_t sub_umbrella
Definition: MachO.h:638
llvm::MachO::section_64::sectname
char sectname[16]
Definition: MachO.h:578
llvm::MachO::tlv_descriptor::offset
uintptr_t offset
Definition: MachO.h:923
llvm::MachO::ppc_thread_state32_t::r31
uint32_t r31
Definition: MachO.h:1913
llvm::MachO::dylib_module_64
Definition: MachO.h:746
llvm::MachO::mach_header::ncmds
uint32_t ncmds
Definition: MachO.h:514
llvm::MachO::fat_header::nfat_arch
uint32_t nfat_arch
Definition: MachO.h:936
llvm::MachO::fat_arch_64::align
uint32_t align
Definition: MachO.h:952
llvm::MachO::MH_CIGAM
@ MH_CIGAM
Definition: MachO.h:31
llvm::MachO::ppc_thread_state_t::tsh
ppc_state_hdr_t tsh
Definition: MachO.h:1971
llvm::MachO::EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE
@ EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE
Definition: MachO.h:295
llvm::MachO::N_LBRAC
@ N_LBRAC
Definition: MachO.h:379
llvm::MachO::rpath_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:794
llvm::MachO::S_ATTR_LOC_RELOC
@ S_ATTR_LOC_RELOC
S_ATTR_LOC_RELOC - Section has local relocation entries.
Definition: MachO.h:212
llvm::MachO::CS_HASHTYPE_SHA384
@ CS_HASHTYPE_SHA384
Definition: MachO.h:2129
llvm::MachO::N_VERSION
@ N_VERSION
Definition: MachO.h:374
llvm::MachO::CS_CodeDirectory::length
uint32_t length
Definition: MachO.h:2153
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:197
llvm::MachO::BIND_SYMBOL_FLAGS_WEAK_IMPORT
@ BIND_SYMBOL_FLAGS_WEAK_IMPORT
Definition: MachO.h:262
llvm::MachO::symtab_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:695
llvm::MachO::MH_SPLIT_SEGS
@ MH_SPLIT_SEGS
Definition: MachO.h:64
llvm::MachO::CS_PLATFORM_BINARY
@ CS_PLATFORM_BINARY
Definition: MachO.h:2053
llvm::MachO::REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY
@ REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY
Definition: MachO.h:333
llvm::MachO::ARM_RELOC_SECTDIFF
@ ARM_RELOC_SECTDIFF
Definition: MachO.h:435
llvm::MachO::SG_FVMLIB
@ SG_FVMLIB
Definition: MachO.h:106
llvm::MachO::nlist
Definition: MachO.h:987
llvm::MachO::MH_MAGIC
@ MH_MAGIC
Definition: MachO.h:30
llvm::MachO::CPU_SUBTYPE_POWERPC_603ev
@ CPU_SUBTYPE_POWERPC_603ev
Definition: MachO.h:1512
llvm::MachO::symtab_command::strsize
uint32_t strsize
Definition: MachO.h:699
llvm::MachO::segment_command_64::nsects
uint32_t nsects
Definition: MachO.h:559
llvm::MachO::fat_arch::align
uint32_t align
Definition: MachO.h:944
llvm::MachO::x86_float_state64_t::fpu_xmm5
xmm_reg_t fpu_xmm5
Definition: MachO.h:1632
llvm::MachO::GENERIC_RELOC_SECTDIFF
@ GENERIC_RELOC_SECTDIFF
Definition: MachO.h:405
llvm::MachO::BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
@ BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
Definition: MachO.h:277
llvm::MachO::kSecCodeSignatureHashSHA384
@ kSecCodeSignatureHashSHA384
Definition: MachO.h:2203
llvm::MachO::PPC_EXCEPTION_STATE
@ PPC_EXCEPTION_STATE
Definition: MachO.h:1985
llvm::MachO::fat_arch_64::size
uint64_t size
Definition: MachO.h:951
llvm::MachO::CS_HASHTYPE_SHA256_TRUNCATED
@ CS_HASHTYPE_SHA256_TRUNCATED
Definition: MachO.h:2128
llvm::MachO::fvmlib::header_addr
uint32_t header_addr
Definition: MachO.h:600
llvm::MachO::REBASE_OPCODE_SET_TYPE_IMM
@ REBASE_OPCODE_SET_TYPE_IMM
Definition: MachO.h:239
llvm::MachO::ARM64_RELOC_BRANCH26
@ ARM64_RELOC_BRANCH26
Definition: MachO.h:453
llvm::MachO::N_PEXT
@ N_PEXT
Definition: MachO.h:302
llvm::MachO::section::offset
uint32_t offset
Definition: MachO.h:568
llvm::MachO::routines_command_64::cmd
uint32_t cmd
Definition: MachO.h:681
llvm::MachO::fp_status_t::precis
unsigned short precis
Definition: MachO.h:1591
llvm::MachO::CS_DEBUGGED
@ CS_DEBUGGED
Definition: MachO.h:2057
llvm::MachO::CPU_SUBTYPE_ARM_V7M
@ CPU_SUBTYPE_ARM_V7M
Definition: MachO.h:1492
llvm::MachO::mach_header::cpusubtype
uint32_t cpusubtype
Definition: MachO.h:512
llvm::MachO::VM_PROT_READ
@ VM_PROT_READ
Definition: MachO.h:488
llvm::MachO::dylib_module::iinit_iterm
uint32_t iinit_iterm
Definition: MachO.h:740
llvm::MachO::CodeSignMagic
CodeSignMagic
Definition: MachO.h:2086
llvm::MachO::dylib_module_64::iextrel
uint32_t iextrel
Definition: MachO.h:754
llvm::MachO::encryption_info_command_64::cryptid
uint32_t cryptid
Definition: MachO.h:830
llvm::MachO::fp_control_t::pc
unsigned short pc
Definition: MachO.h:1586
llvm::MachO::CS_VALID
@ CS_VALID
Definition: MachO.h:2013
llvm::MachO::x86_float_state64_t::fpu_stmm0
mmst_reg_t fpu_stmm0
Definition: MachO.h:1619
llvm::MachO::CPU_SUBTYPE_PENTII_M5
@ CPU_SUBTYPE_PENTII_M5
Definition: MachO.h:1452
llvm::MachO::ppc_thread_state32_t::r10
uint32_t r10
Definition: MachO.h:1892
llvm::MachO::CSSLOT_INFOSLOT
@ CSSLOT_INFOSLOT
Definition: MachO.h:2106
llvm::MachO::X86_64_RELOC_SIGNED_4
@ X86_64_RELOC_SIGNED_4
Definition: MachO.h:482
llvm::MachO::ARM_EXCEPTION_STATE
@ ARM_EXCEPTION_STATE
Definition: MachO.h:1860
llvm::MachO::x86_EXCEPTION_STATE64_COUNT
const uint32_t x86_EXCEPTION_STATE64_COUNT
Definition: MachO.h:1793
llvm::MachO::CS_CodeDirectory::nSpecialSlots
uint32_t nSpecialSlots
Definition: MachO.h:2158
llvm::MachO::N_PC
@ N_PC
Definition: MachO.h:361
llvm::MachO::entry_point_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:928
llvm::MachO::CPU_SUBTYPE_PENTIUM_M
@ CPU_SUBTYPE_PENTIUM_M
Definition: MachO.h:1458
llvm::MachO::x86_float_state64_t::fpu_rsrv4
char fpu_rsrv4[6 *16]
Definition: MachO.h:1643
llvm::MachO::ppc_thread_state32_t::r7
uint32_t r7
Definition: MachO.h:1889
llvm::MachO::x86_exception_state64_t::trapno
uint16_t trapno
Definition: MachO.h:1648
llvm::MachO::MH_EXECUTE
@ MH_EXECUTE
Definition: MachO.h:44
llvm::MachO::CS_CodeDirectory::hashSize
uint8_t hashSize
Definition: MachO.h:2161
llvm::MachO::S_ATTR_DEBUG
@ S_ATTR_DEBUG
S_ATTR_DEBUG - A debug section.
Definition: MachO.h:202
llvm::MachO::dysymtab_command::indirectsymoff
uint32_t indirectsymoff
Definition: MachO.h:717
llvm::MachO::ARM64_RELOC_ADDEND
@ ARM64_RELOC_ADDEND
Definition: MachO.h:469
llvm::MachO::entry_point_command::cmd
uint32_t cmd
Definition: MachO.h:927
llvm::MachO::segment_command::filesize
uint32_t filesize
Definition: MachO.h:542
llvm::MachO::rpath_command
Definition: MachO.h:792
llvm::MachO::ppc_thread_state32_t::r6
uint32_t r6
Definition: MachO.h:1888
llvm::MachO::N_GSYM
@ N_GSYM
Definition: MachO.h:355
llvm::MachO::relocation_info::r_address
int32_t r_address
Definition: MachO.h:958
Error.h
llvm::MachO::REBASE_TYPE_POINTER
@ REBASE_TYPE_POINTER
Definition: MachO.h:230
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
SwapByteOrder.h
llvm::MachO::PLATFORM_IOS
@ PLATFORM_IOS
Definition: MachO.h:493
llvm::MachO::N_ENSYM
@ N_ENSYM
Definition: MachO.h:366
llvm::MachO::ARM_RELOC_LOCAL_SECTDIFF
@ ARM_RELOC_LOCAL_SECTDIFF
Definition: MachO.h:436
llvm::MachO::MH_NOFIXPREBINDING
@ MH_NOFIXPREBINDING
Definition: MachO.h:69
llvm::MachO::section_64::addr
uint64_t addr
Definition: MachO.h:580
llvm::MachO::sub_framework_command
Definition: MachO.h:623
llvm::MachO::CPU_TYPE_ARM
@ CPU_TYPE_ARM
Definition: MachO.h:1425
llvm::MachO::data_in_code_entry::offset
uint32_t offset
Definition: MachO.h:806
llvm::MachO::SET_LIBRARY_ORDINAL
void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal)
Definition: MachO.h:1397
llvm::MachO::ppc_thread_state32_t::mq
uint32_t mq
Definition: MachO.h:1918
llvm::MachO::S_LITERAL_POINTERS
@ S_LITERAL_POINTERS
S_LITERAL_POINTERS - Section with pointers to literals.
Definition: MachO.h:135
llvm::MachO::DICE_KIND_JUMP_TABLE8
@ DICE_KIND_JUMP_TABLE8
Definition: MachO.h:223
llvm::MachO::nlist_64::n_strx
uint32_t n_strx
Definition: MachO.h:996
llvm::MachO::x86_float_state64_t::fpu_ftw
uint8_t fpu_ftw
Definition: MachO.h:1608
llvm::MachO::ppc_thread_state32_t::r5
uint32_t r5
Definition: MachO.h:1887
llvm::MachO::dylib_module::module_name
uint32_t module_name
Definition: MachO.h:731
llvm::MachO::REBASE_OPCODE_ADD_ADDR_ULEB
@ REBASE_OPCODE_ADD_ADDR_ULEB
Definition: MachO.h:241
llvm::MachO::arm_thread_state_t::ts32
arm_thread_state32_t ts32
Definition: MachO.h:1848
llvm::MachO::CS_EXECSEG_JIT
@ CS_EXECSEG_JIT
Definition: MachO.h:2077
llvm::MachO::arm_thread_state64_t::sp
uint64_t sp
Definition: MachO.h:1824
llvm::MachO::CSSLOT_TICKETSLOT
@ CSSLOT_TICKETSLOT
Definition: MachO.h:2121
llvm::MachO::dylib::name
uint32_t name
Definition: MachO.h:611
llvm::MachO::segment_command::fileoff
uint32_t fileoff
Definition: MachO.h:541
llvm::MachO::x86_float_state64_t::fpu_stmm3
mmst_reg_t fpu_stmm3
Definition: MachO.h:1622
llvm::MachO::sub_library_command::cmd
uint32_t cmd
Definition: MachO.h:642
llvm::MachO::PLATFORM_MACCATALYST
@ PLATFORM_MACCATALYST
Definition: MachO.h:497
llvm::MachO::segment_command_64::cmd
uint32_t cmd
Definition: MachO.h:550
llvm::MachO::symtab_command
Definition: MachO.h:693
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:153
llvm::MachO::segment_command::vmsize
uint32_t vmsize
Definition: MachO.h:540
llvm::MachO::N_COLD_FUNC
@ N_COLD_FUNC
Definition: MachO.h:343
llvm::MachO::CS_EXEC_INHERIT_SIP
@ CS_EXEC_INHERIT_SIP
Definition: MachO.h:2047
llvm::MachO::GET_COMM_ALIGN
uint8_t GET_COMM_ALIGN(uint16_t n_desc)
Definition: MachO.h:1401
llvm::MachO::fvmlib
Definition: MachO.h:597
llvm::MachO::build_version_command
Definition: MachO.h:855
llvm::MachO::DICE_KIND_DATA
@ DICE_KIND_DATA
Definition: MachO.h:222
llvm::MachO::CS_ENTITLEMENTS_VALIDATED
@ CS_ENTITLEMENTS_VALIDATED
Definition: MachO.h:2030
llvm::MachO::MH_DYLDLINK
@ MH_DYLDLINK
Definition: MachO.h:61
llvm::MachO::x86_EXCEPTION_STATE
@ x86_EXCEPTION_STATE
Definition: MachO.h:1762
llvm::MachO::ppc_thread_state32_t::ct
uint32_t ct
Definition: MachO.h:1914
llvm::MachO::section::segname
char segname[16]
Definition: MachO.h:565
llvm::MachO::CS_CodeDirectory::execSegBase
uint64_t execSegBase
Definition: MachO.h:2178
llvm::MachO::S_ATTR_SOME_INSTRUCTIONS
@ S_ATTR_SOME_INSTRUCTIONS
S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.
Definition: MachO.h:208
llvm::MachO::prebind_cksum_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:782
llvm::MachO::SECTION_ATTRIBUTES
@ SECTION_ATTRIBUTES
Definition: MachO.h:113
llvm::MachO::DICE_KIND_JUMP_TABLE16
@ DICE_KIND_JUMP_TABLE16
Definition: MachO.h:224
llvm::MachO::REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
@ REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
Definition: MachO.h:240
llvm::MachO::x86_thread_state64_t::rax
uint64_t rax
Definition: MachO.h:1548
llvm::MachO::mmst_reg_t::mmst_reg
char mmst_reg[10]
Definition: MachO.h:1596
llvm::MachO::CSSLOT_ENTITLEMENTS
@ CSSLOT_ENTITLEMENTS
Definition: MachO.h:2110
llvm::MachO::REFERENCE_FLAG_UNDEFINED_NON_LAZY
@ REFERENCE_FLAG_UNDEFINED_NON_LAZY
Definition: MachO.h:329
llvm::MachO::PPC_RELOC_BR14
@ PPC_RELOC_BR14
Definition: MachO.h:415
llvm::MachO::CPUType
CPUType
Definition: MachO.h:1418
llvm::MachO::dysymtab_command::tocoff
uint32_t tocoff
Definition: MachO.h:711
llvm::MachO::N_SYMBOL_RESOLVER
@ N_SYMBOL_RESOLVER
Definition: MachO.h:341
llvm::MachO::x86_float_state64_t::fpu_xmm9
xmm_reg_t fpu_xmm9
Definition: MachO.h:1636
llvm::MachO::encryption_info_command_64::cmd
uint32_t cmd
Definition: MachO.h:826
llvm::MachO::CS_SIGNER_TYPE_MAC_APP_STORE
@ CS_SIGNER_TYPE_MAC_APP_STORE
Definition: MachO.h:2144
llvm::MachO::isVirtualSection
bool isVirtualSection(uint8_t type)
Definition: MachO.h:592
llvm::MachO::rpath_command::path
uint32_t path
Definition: MachO.h:795
llvm::MachO::ARM_RELOC_PB_LA_PTR
@ ARM_RELOC_PB_LA_PTR
Definition: MachO.h:437
llvm::MachO::CPU_SUBTYPE_PENT
@ CPU_SUBTYPE_PENT
Definition: MachO.h:1449
llvm::MachO::load_command::cmd
uint32_t cmd
Definition: MachO.h:531
llvm::MachO::CS_SUPPORTSTEAMID
@ CS_SUPPORTSTEAMID
Definition: MachO.h:2099
llvm::MachO::LoadCommandType
LoadCommandType
Definition: MachO.h:97
llvm::MachO::x86_thread_state64_t::r14
uint64_t r14
Definition: MachO.h:1562
llvm::MachO::sub_framework_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:625
llvm::MachO::dyld_info_command::export_off
uint32_t export_off
Definition: MachO.h:876
llvm::MachO::CodeSignExecSegFlags
CodeSignExecSegFlags
Definition: MachO.h:2072
llvm::MachO::S_ZEROFILL
@ S_ZEROFILL
S_ZEROFILL - Zero fill on demand section.
Definition: MachO.h:127
llvm::MachO::CS_EXECSEG_CAN_LOAD_CDHASH
@ CS_EXECSEG_CAN_LOAD_CDHASH
Definition: MachO.h:2079
llvm::MachO::fvmlib::minor_version
uint32_t minor_version
Definition: MachO.h:599
llvm::MachO::PPC_RELOC_LO16
@ PPC_RELOC_LO16
Definition: MachO.h:418
llvm::MachO::CS_CodeDirectory::flags
uint32_t flags
Definition: MachO.h:2155
llvm::MachO::x86_thread_state32_t::es
uint32_t es
Definition: MachO.h:1542
llvm::MachO::tlv_descriptor::thunk
uintptr_t thunk
Definition: MachO.h:921
llvm::MachO::dysymtab_command::nindirectsyms
uint32_t nindirectsyms
Definition: MachO.h:718
llvm::MachO::dylib_module::iextdefsym
uint32_t iextdefsym
Definition: MachO.h:732
llvm::MachO::section::size
uint32_t size
Definition: MachO.h:567
llvm::MachO::dylib_module_64::iextdefsym
uint32_t iextdefsym
Definition: MachO.h:748
llvm::MachO::CPU_ARCH_ABI64
@ CPU_ARCH_ABI64
Definition: MachO.h:1413
llvm::MachO::nlist::n_sect
uint8_t n_sect
Definition: MachO.h:990
llvm::MachO::ppc_thread_state32_t::r28
uint32_t r28
Definition: MachO.h:1910
llvm::MachO::mach_header_64::ncmds
uint32_t ncmds
Definition: MachO.h:524
llvm::MachO::CPU_SUBTYPE_POWERPC_7450
@ CPU_SUBTYPE_POWERPC_7450
Definition: MachO.h:1518
llvm::MachO::section_64::offset
uint32_t offset
Definition: MachO.h:582
llvm::MachO::ExportSymbolKind
ExportSymbolKind
Definition: MachO.h:292
llvm::MachO::N_UNDF
@ N_UNDF
Definition: MachO.h:310
llvm::MachO::BindSpecialDylib
BindSpecialDylib
Definition: MachO.h:255
llvm::MachO::MH_MAGIC_64
@ MH_MAGIC_64
Definition: MachO.h:32
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
llvm::MachO::x86_THREAD_STATE
@ x86_THREAD_STATE
Definition: MachO.h:1760
llvm::MachO::CPU_SUBTYPE_PENTIUM_3
@ CPU_SUBTYPE_PENTIUM_3
Definition: MachO.h:1455
llvm::MachO::MH_SETUID_SAFE
@ MH_SETUID_SAFE
Definition: MachO.h:78
llvm::MachO::MH_NO_HEAP_EXECUTION
@ MH_NO_HEAP_EXECUTION
Definition: MachO.h:83
llvm::MachO::nlist::n_value
uint32_t n_value
Definition: MachO.h:992
llvm::MachO::prebound_dylib_command::cmd
uint32_t cmd
Definition: MachO.h:649
llvm::MachO::CPU_SUBTYPE_I386_ALL
@ CPU_SUBTYPE_I386_ALL
Definition: MachO.h:1444
llvm::MachO::dylib_module
Definition: MachO.h:730
llvm::MachO::CS_CodeDirectory::codeLimit64
uint64_t codeLimit64
Definition: MachO.h:2175
llvm::MachO::X86_64_RELOC_SIGNED_2
@ X86_64_RELOC_SIGNED_2
Definition: MachO.h:481
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:142
llvm::MachO::S_8BYTE_LITERALS
@ S_8BYTE_LITERALS
S_8BYTE_LITERALS - Section with 8 byte literals.
Definition: MachO.h:133
llvm::MachO::x86_float_state64_t::fpu_xmm3
xmm_reg_t fpu_xmm3
Definition: MachO.h:1630
llvm::MachO::scattered_relocation_info::r_value
int32_t r_value
Definition: MachO.h:971
llvm::MachO::prebound_dylib_command
Definition: MachO.h:648
llvm::MachO::CPU_SUBTYPE_SPARC_ALL
@ CPU_SUBTYPE_SPARC_ALL
Definition: MachO.h:1504
llvm::MachO::note_command::cmd
uint32_t cmd
Definition: MachO.h:843
llvm::MachO::CPU_SUBTYPE_POWERPC_603
@ CPU_SUBTYPE_POWERPC_603
Definition: MachO.h:1510
llvm::MachO::build_version_command::sdk
uint32_t sdk
Definition: MachO.h:861
llvm::MachO::EXPORT_SYMBOL_FLAGS_KIND_MASK
@ EXPORT_SYMBOL_FLAGS_KIND_MASK
Definition: MachO.h:286
llvm::MachO::tlv_descriptor_64
Definition: MachO.h:914
llvm::MachO::section_64::reserved2
uint32_t reserved2
Definition: MachO.h:588
llvm::MachO::arm_thread_state32_t::r
uint32_t r[13]
Definition: MachO.h:1804
llvm::MachO::x86_thread_state32_t::eflags
uint32_t eflags
Definition: MachO.h:1538
llvm::MachO::build_tool_version::version
uint32_t version
Definition: MachO.h:852
llvm::MachO::CS_CodeDirectory::identOffset
uint32_t identOffset
Definition: MachO.h:2157
llvm::MachO::routines_command_64::reserved1
uint64_t reserved1
Definition: MachO.h:685
llvm::MachO::encryption_info_command_64::cryptoff
uint32_t cryptoff
Definition: MachO.h:828
llvm::MachO::ppc_thread_state32_t::r12
uint32_t r12
Definition: MachO.h:1894
llvm::MachO::x86_float_state64_t::fpu_xmm7
xmm_reg_t fpu_xmm7
Definition: MachO.h:1634
llvm::MachO::MH_NOMULTIDEFS
@ MH_NOMULTIDEFS
Definition: MachO.h:68
llvm::MachO::nlist_64::n_type
uint8_t n_type
Definition: MachO.h:997
llvm::MachO::BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
@ BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
Definition: MachO.h:280
llvm::MachO::x86_float_state64_t::fpu_stmm7
mmst_reg_t fpu_stmm7
Definition: MachO.h:1626
llvm::MachO::arm_thread_state32_t::lr
uint32_t lr
Definition: MachO.h:1806
llvm::MachO::symtab_command::nsyms
uint32_t nsyms
Definition: MachO.h:697
llvm::MachO::TOOL_SWIFT
@ TOOL_SWIFT
Definition: MachO.h:505
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:148
llvm::MachO::CPU_TYPE_X86_64
@ CPU_TYPE_X86_64
Definition: MachO.h:1422
llvm::MachO::ident_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:897
llvm::MachO::CPU_SUBTYPE_POWERPC_604e
@ CPU_SUBTYPE_POWERPC_604e
Definition: MachO.h:1514
llvm::MachO::thread_command
Definition: MachO.h:662
llvm::MachO::x86_thread_state64_t::rdi
uint64_t rdi
Definition: MachO.h:1552
llvm::MachO::dylib_module::nextdefsym
uint32_t nextdefsym
Definition: MachO.h:733
llvm::MachO::INDIRECT_SYMBOL_LOCAL
@ INDIRECT_SYMBOL_LOCAL
Definition: MachO.h:216
llvm::MachO::thread_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:664
llvm::MachO::MH_CANONICAL
@ MH_CANONICAL
Definition: MachO.h:73
llvm::MachO::entry_point_command::stacksize
uint64_t stacksize
Definition: MachO.h:930
llvm::MachO::CS_CodeDirectory::scatterOffset
uint32_t scatterOffset
Definition: MachO.h:2168
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:1586
llvm::MachO::uuid_command
Definition: MachO.h:786
llvm::MachO::section::addr
uint32_t addr
Definition: MachO.h:566
llvm::MachO::PPC_RELOC_JBSR
@ PPC_RELOC_JBSR
Definition: MachO.h:426
llvm::MachO::uuid_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:788
llvm::MachO::ARM64_RELOC_SUBTRACTOR
@ ARM64_RELOC_SUBTRACTOR
Definition: MachO.h:451
llvm::MachO::FAT_MAGIC
@ FAT_MAGIC
Definition: MachO.h:34
llvm::MachO::fp_status_t::invalid
unsigned short invalid
Definition: MachO.h:1590
llvm::MachO::StabType
StabType
Definition: MachO.h:352
llvm::MachO::x86_DEBUG_STATE
@ x86_DEBUG_STATE
Definition: MachO.h:1765
llvm::MachO::fvmfile_command::header_addr
uint32_t header_addr
Definition: MachO.h:905
llvm::MachO::arm_state_hdr_t::count
uint32_t count
Definition: MachO.h:1842
llvm::MachO::CSTYPE_INDEX_ENTITLEMENTS
@ CSTYPE_INDEX_ENTITLEMENTS
Definition: MachO.h:2124
llvm::MachO::PLATFORM_IOSSIMULATOR
@ PLATFORM_IOSSIMULATOR
Definition: MachO.h:498
llvm::MachO::fp_status_t::denorm
unsigned short denorm
Definition: MachO.h:1590
llvm::MachO::fat_arch::size
uint32_t size
Definition: MachO.h:943
llvm::MachO::prebind_cksum_command::cmd
uint32_t cmd
Definition: MachO.h:781
llvm::MachO::X86_64_RELOC_BRANCH
@ X86_64_RELOC_BRANCH
Definition: MachO.h:476
llvm::Reloc::Model
Model
Definition: CodeGen.h:22
llvm::MachO::dyld_info_command
Definition: MachO.h:865
llvm::MachO::CPU_TYPE_POWERPC64
@ CPU_TYPE_POWERPC64
Definition: MachO.h:1430
llvm::MachO::MH_NOUNDEFS
@ MH_NOUNDEFS
Definition: MachO.h:59
llvm::MachO::MH_ALLMODSBOUND
@ MH_ALLMODSBOUND
Definition: MachO.h:71
llvm::MachO::EXECUTABLE_ORDINAL
@ EXECUTABLE_ORDINAL
Definition: MachO.h:349
llvm::MachO::x86_thread_state32_t::ss
uint32_t ss
Definition: MachO.h:1537
llvm::MachO::CS_EXECSEG_CAN_EXEC_CDHASH
@ CS_EXECSEG_CAN_EXEC_CDHASH
Definition: MachO.h:2080
llvm::MachO::N_EXCL
@ N_EXCL
Definition: MachO.h:380
llvm::MachO::x86_thread_state32_t::edi
uint32_t edi
Definition: MachO.h:1533
llvm::MachO::MH_CORE
@ MH_CORE
Definition: MachO.h:46
llvm::MachO::CS_CodeDirectory::nCodeSlots
uint32_t nCodeSlots
Definition: MachO.h:2159
llvm::MachO::x86_float_state64_t::fpu_xmm15
xmm_reg_t fpu_xmm15
Definition: MachO.h:1642
llvm::MachO::SecCSDigestAlgorithm
SecCSDigestAlgorithm
Definition: MachO.h:2197
llvm::MachO::mach_header::flags
uint32_t flags
Definition: MachO.h:516
llvm::MachO::version_min_command::version
uint32_t version
Definition: MachO.h:838
llvm::MachO::CPU_SUBTYPE_INTEL_MODEL_ALL
@ CPU_SUBTYPE_INTEL_MODEL_ALL
Definition: MachO.h:1478
llvm::MachO::dysymtab_command::locreloff
uint32_t locreloff
Definition: MachO.h:721
llvm::MachO::PPC_RELOC_LO16_SECTDIFF
@ PPC_RELOC_LO16_SECTDIFF
Definition: MachO.h:424
llvm::MachO::routines_command_64::cmdsize
uint32_t cmdsize
Definition: MachO.h:682
llvm::MachO::data_in_code_entry
Definition: MachO.h:805
llvm::MachO::sub_client_command
Definition: MachO.h:629
llvm::MachO::fp_control_t::invalid
unsigned short invalid
Definition: MachO.h:1585
llvm::MachO::TOOL_CLANG
@ TOOL_CLANG
Definition: MachO.h:505
llvm::MachO::x86_float_state64_t::fpu_xmm4
xmm_reg_t fpu_xmm4
Definition: MachO.h:1631
llvm::MachO::section_64::segname
char segname[16]
Definition: MachO.h:579
llvm::MachO::CS_EXEC_SET_KILL
@ CS_EXEC_SET_KILL
Definition: MachO.h:2044
llvm::MachO::fat_arch
Definition: MachO.h:939
llvm::MachO::fat_arch_64::cputype
uint32_t cputype
Definition: MachO.h:948
llvm::MachO::ppc_state_hdr_t::count
uint32_t count
Definition: MachO.h:1967
llvm::MachO::S_COALESCED
@ S_COALESCED
S_COALESCED - Section contains symbols that are to be coalesced.
Definition: MachO.h:150
llvm::MachO::ARM_EXCEPTION_STATE64
@ ARM_EXCEPTION_STATE64
Definition: MachO.h:1864
llvm::MachO::fvmlib::name
uint32_t name
Definition: MachO.h:598
llvm::MachO::ARM_VFP_STATE
@ ARM_VFP_STATE
Definition: MachO.h:1859
llvm::MachO::PPC_THREAD_STATE_NONE
@ PPC_THREAD_STATE_NONE
Definition: MachO.h:1989
llvm::MachO::CPU_SUBTYPE_ITANIUM
@ CPU_SUBTYPE_ITANIUM
Definition: MachO.h:1461
llvm::MachO::SECTION_ATTRIBUTES_USR
@ SECTION_ATTRIBUTES_USR
Definition: MachO.h:114
llvm::MachO::CPU_SUBTYPE_X86_ARCH1
@ CPU_SUBTYPE_X86_ARCH1
Definition: MachO.h:1468
llvm::MachO::N_PSYM
@ N_PSYM
Definition: MachO.h:376
llvm::MachO::CS_CodeDirectory::magic
uint32_t magic
Definition: MachO.h:2152
llvm::MachO::x86_EXCEPTION_STATE64
@ x86_EXCEPTION_STATE64
Definition: MachO.h:1759
llvm::MachO::N_RBRAC
@ N_RBRAC
Definition: MachO.h:381
llvm::MachO::routines_command
Definition: MachO.h:667
llvm::MachO::fp_control_t
Definition: MachO.h:1584
llvm::MachO::dysymtab_command::ntoc
uint32_t ntoc
Definition: MachO.h:712
llvm::MachO::x86_float_state_t::ufs
union llvm::MachO::x86_float_state_t::@139 ufs
llvm::MachO::TOOL_LD
@ TOOL_LD
Definition: MachO.h:505
llvm::MachO::CS_SuperBlob::count
uint32_t count
Definition: MachO.h:2193
llvm::MachO::N_ENTRY
@ N_ENTRY
Definition: MachO.h:378
llvm::MachO::routines_command::reserved4
uint32_t reserved4
Definition: MachO.h:675
llvm::MachO::PPCThreadFlavors
PPCThreadFlavors
Definition: MachO.h:1982
llvm::MachO::ppc_thread_state32_t::r22
uint32_t r22
Definition: MachO.h:1904
llvm::MachO::x86_thread_state64_t::fs
uint64_t fs
Definition: MachO.h:1567
llvm::MachO::any_relocation_info::r_word1
uint32_t r_word1
Definition: MachO.h:976
llvm::MachO::nlist_64::n_value
uint64_t n_value
Definition: MachO.h:1000
llvm::MachO::segment_command::cmd
uint32_t cmd
Definition: MachO.h:536
llvm::MachO::N_NO_DEAD_STRIP
@ N_NO_DEAD_STRIP
Definition: MachO.h:338
llvm::MachO::GENERIC_RELOC_PAIR
@ GENERIC_RELOC_PAIR
Definition: MachO.h:404
llvm::MachO::dysymtab_command::nextdefsym
uint32_t nextdefsym
Definition: MachO.h:708
llvm::MachO::twolevel_hints_command::nhints
uint32_t nhints
Definition: MachO.h:771
llvm::MachO::DYNAMIC_LOOKUP_ORDINAL
@ DYNAMIC_LOOKUP_ORDINAL
Definition: MachO.h:348
llvm::MachO::MH_BINDS_TO_WEAK
@ MH_BINDS_TO_WEAK
Definition: MachO.h:75
llvm::MachO::CSMAGIC_BLOBWRAPPER
@ CSMAGIC_BLOBWRAPPER
Definition: MachO.h:2096
llvm::MachO::CPU_SUBTYPE_ARM64_V8
@ CPU_SUBTYPE_ARM64_V8
Definition: MachO.h:1498
llvm::MachO::prebound_dylib_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:650
llvm::MachO::dylib_table_of_contents
Definition: MachO.h:725
llvm::MachO::rpath_command::cmd
uint32_t cmd
Definition: MachO.h:793
llvm::MachO::x86_float_state64_t::fpu_mxcsrmask
uint32_t fpu_mxcsrmask
Definition: MachO.h:1618
llvm::MachO::CSSLOT_APPLICATION
@ CSSLOT_APPLICATION
Definition: MachO.h:2109
llvm::MachO::x86_float_state64_t::fpu_stmm2
mmst_reg_t fpu_stmm2
Definition: MachO.h:1621
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::MachO::routines_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:669
llvm::MachO::GET_LIBRARY_ORDINAL
uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc)
Definition: MachO.h:1393
llvm::MachO::N_PARAMS
@ N_PARAMS
Definition: MachO.h:373
llvm::MachO::CPU_SUBTYPE_POWERPC_602
@ CPU_SUBTYPE_POWERPC_602
Definition: MachO.h:1509
llvm::MachO::SET_COMM_ALIGN
void SET_COMM_ALIGN(uint16_t &n_desc, uint8_t align)
Definition: MachO.h:1405
llvm::MachO::CS_BlobIndex
Definition: MachO.h:2185
llvm::MachO::tlv_descriptor_32::key
uint32_t key
Definition: MachO.h:910
llvm::MachO::dylib_reference::flags
uint32_t flags
Definition: MachO.h:763
llvm::MachO::uuid_command::uuid
uint8_t uuid[16]
Definition: MachO.h:789
llvm::MachO::PPC_RELOC_HA16_SECTDIFF
@ PPC_RELOC_HA16_SECTDIFF
Definition: MachO.h:425
llvm::MachO::ppc_thread_state32_t::ctr
uint32_t ctr
Definition: MachO.h:1917
llvm::MachO::MAX_SECT
@ MAX_SECT
Definition: MachO.h:321
llvm::MachO::CSMAGIC_DETACHED_SIGNATURE
@ CSMAGIC_DETACHED_SIGNATURE
Definition: MachO.h:2094
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:1891
llvm::MachO::segment_command_64::segname
char segname[16]
Definition: MachO.h:552
llvm::MachO::N_PBUD
@ N_PBUD
Definition: MachO.h:313
llvm::MachO::nlist_64::n_sect
uint8_t n_sect
Definition: MachO.h:998
llvm::MachO::CS_SUPPORTSEXECSEG
@ CS_SUPPORTSEXECSEG
Definition: MachO.h:2101
llvm::MachO::S_REGULAR
@ S_REGULAR
S_REGULAR - Regular section.
Definition: MachO.h:125
llvm::MachO::x86_thread_state32_t::fs
uint32_t fs
Definition: MachO.h:1543
llvm::MachO::CPU_SUBTYPE_ARM_V7K
@ CPU_SUBTYPE_ARM_V7K
Definition: MachO.h:1490
llvm::MachO::CS_SHA256_LEN
@ CS_SHA256_LEN
Definition: MachO.h:2132
llvm::MachO::x86_FP_RND_DOWN
@ x86_FP_RND_DOWN
Definition: MachO.h:1579
llvm::MachO::REFERENCE_FLAG_DEFINED
@ REFERENCE_FLAG_DEFINED
Definition: MachO.h:331
llvm::MachO::x86_thread_state64_t::rflags
uint64_t rflags
Definition: MachO.h:1565
llvm::MachO::CS_SIGNED
@ CS_SIGNED
Definition: MachO.h:2059
llvm::MachO::CPU_TYPE_POWERPC
@ CPU_TYPE_POWERPC
Definition: MachO.h:1429
llvm::MachO::GENERIC_RELOC_INVALID
@ GENERIC_RELOC_INVALID
Definition: MachO.h:402
llvm::MachO::x86_float_state64_t
Definition: MachO.h:1604
llvm::MachO::CPU_SUBTYPE_XEON_MP
@ CPU_SUBTYPE_XEON_MP
Definition: MachO.h:1464
llvm::MachO::dylib_module::objc_module_info_size
uint32_t objc_module_info_size
Definition: MachO.h:743
llvm::MachO::ARM_THREAD_STATE_COUNT
const uint32_t ARM_THREAD_STATE_COUNT
Definition: MachO.h:1873
llvm::MachO::dylib_module::nrefsym
uint32_t nrefsym
Definition: MachO.h:735
llvm::MachO::source_version_command
Definition: MachO.h:811
llvm::MachO::dylib_module_64::objc_module_info_addr
uint64_t objc_module_info_addr
Definition: MachO.h:759
llvm::MachO::REBASE_IMMEDIATE_MASK
@ REBASE_IMMEDIATE_MASK
Definition: MachO.h:235
llvm::MachO::DICE_KIND_ABS_JUMP_TABLE32
@ DICE_KIND_ABS_JUMP_TABLE32
Definition: MachO.h:226
llvm::MachO::fat_header::magic
uint32_t magic
Definition: MachO.h:935
llvm::MachO::x86_THREAD_STATE32_COUNT
const uint32_t x86_THREAD_STATE32_COUNT
Definition: MachO.h:1786
llvm::MachO::x86_float_state64_t::fpu_xmm10
xmm_reg_t fpu_xmm10
Definition: MachO.h:1637
llvm::MachO::CPU_SUBTYPE_POWERPC_ALL
@ CPU_SUBTYPE_POWERPC_ALL
Definition: MachO.h:1507
llvm::MachO::BIND_OPCODE_SET_TYPE_IMM
@ BIND_OPCODE_SET_TYPE_IMM
Definition: MachO.h:275
llvm::MachO::mach_header_64::reserved
uint32_t reserved
Definition: MachO.h:527
llvm::MachO::ppc_thread_state32_t::r2
uint32_t r2
Definition: MachO.h:1884
llvm::MachO::linkedit_data_command
Definition: MachO.h:798
llvm::MachO::arm_thread_state64_t::pad
uint32_t pad
Definition: MachO.h:1827
llvm::MachO::dylib_module::irefsym
uint32_t irefsym
Definition: MachO.h:734
llvm::MachO::CS_BlobIndex::offset
uint32_t offset
Definition: MachO.h:2187
llvm::MachO::N_OPT
@ N_OPT
Definition: MachO.h:363
llvm::MachO::MH_PIE
@ MH_PIE
Definition: MachO.h:80
llvm::MachO::kSecCodeSignatureHashSHA256
@ kSecCodeSignatureHashSHA256
Definition: MachO.h:2200
llvm::MachO::CPU_SUBTYPE_PENTPRO
@ CPU_SUBTYPE_PENTPRO
Definition: MachO.h:1450
llvm::MachO::GENERIC_RELOC_VANILLA
@ GENERIC_RELOC_VANILLA
Definition: MachO.h:403
llvm::MachO::segment_command::segname
char segname[16]
Definition: MachO.h:538
llvm::MachO::REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
@ REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
Definition: MachO.h:246
llvm::MachO::ARM_RELOC_HALF
@ ARM_RELOC_HALF
Definition: MachO.h:441
llvm::MachO::x86_exception_state_t
Definition: MachO.h:1741
llvm::MachO::x86_thread_state32_t::esi
uint32_t esi
Definition: MachO.h:1534
llvm::MachO::CS_SUPPL_SIGNER_TYPE_TRUSTCACHE
@ CS_SUPPL_SIGNER_TYPE_TRUSTCACHE
Definition: MachO.h:2147
llvm::MachO::entry_point_command::entryoff
uint64_t entryoff
Definition: MachO.h:929
llvm::MachO::MH_WEAK_DEFINES
@ MH_WEAK_DEFINES
Definition: MachO.h:74
llvm::MachO::ppc_thread_state32_t::r21
uint32_t r21
Definition: MachO.h:1903
llvm::MachO::fp_control_t::ovrfl
unsigned short ovrfl
Definition: MachO.h:1585
llvm::MachO::PlatformType
PlatformType
Definition: MachO.h:491
llvm::MachO::x86_exception_state64_t::faultvaddr
uint64_t faultvaddr
Definition: MachO.h:1651
llvm::MachO::routines_command::init_address
uint32_t init_address
Definition: MachO.h:670
llvm::MachO::dysymtab_command::cmd
uint32_t cmd
Definition: MachO.h:703
llvm::MachO::x86_float_state64_t::fpu_xmm11
xmm_reg_t fpu_xmm11
Definition: MachO.h:1638
llvm::MachO::CS_LINKER_SIGNED
@ CS_LINKER_SIGNED
Definition: MachO.h:2037
llvm::MachO::x86_thread_state64_t::rip
uint64_t rip
Definition: MachO.h:1564
llvm::MachO::ident_command
Definition: MachO.h:895
llvm::MachO::arm_thread_state_t::tsh
arm_state_hdr_t tsh
Definition: MachO.h:1846
llvm::MachO::BIND_IMMEDIATE_MASK
@ BIND_IMMEDIATE_MASK
Definition: MachO.h:266
llvm::MachO::fp_control_t::zdiv
unsigned short zdiv
Definition: MachO.h:1585
llvm::MachO::x86_thread_state64_t::r15
uint64_t r15
Definition: MachO.h:1563
llvm::MachO::ppc_thread_state32_t::r23
uint32_t r23
Definition: MachO.h:1905
llvm::MachO::N_RSYM
@ N_RSYM
Definition: MachO.h:364
llvm::MachO::PPC_RELOC_LO14
@ PPC_RELOC_LO14
Definition: MachO.h:420
llvm::MachO::section_64::nreloc
uint32_t nreloc
Definition: MachO.h:585
llvm::MachO::segment_command::initprot
uint32_t initprot
Definition: MachO.h:544
llvm::MachO::fp_status_t::busy
unsigned short busy
Definition: MachO.h:1592
llvm::MachO::x86_float_state64_t::fpu_xmm6
xmm_reg_t fpu_xmm6
Definition: MachO.h:1633
llvm::MachO::arm_thread_state_t
Definition: MachO.h:1845
llvm::MachO::BindType
BindType
Definition: MachO.h:249
llvm::MachO::twolevel_hints_command::cmd
uint32_t cmd
Definition: MachO.h:768
llvm::MachO::mach_header_64::magic
uint32_t magic
Definition: MachO.h:520
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:624
llvm::MachO::MH_APP_EXTENSION_SAFE
@ MH_APP_EXTENSION_SAFE
Definition: MachO.h:84
llvm::MachO::CS_SUPPORTSLINKAGE
@ CS_SUPPORTSLINKAGE
Definition: MachO.h:2103
llvm::MachO::PPC_EXCEPTION_STATE64
@ PPC_EXCEPTION_STATE64
Definition: MachO.h:1988
llvm::MachO::CS_KILLED
@ CS_KILLED
Definition: MachO.h:2050
llvm::MachO::section_64::flags
uint32_t flags
Definition: MachO.h:586
llvm::MachO::S_LAZY_SYMBOL_POINTERS
@ S_LAZY_SYMBOL_POINTERS
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
Definition: MachO.h:139
llvm::MachO::dysymtab_command::nundefsym
uint32_t nundefsym
Definition: MachO.h:710
llvm::MachO::x86_float_state64_t::fpu_rsrv3
uint16_t fpu_rsrv3
Definition: MachO.h:1616
llvm::MachO::twolevel_hint::itoc
uint32_t itoc
Definition: MachO.h:776
llvm::MachO::ARM_THUMB_32BIT_BRANCH
@ ARM_THUMB_32BIT_BRANCH
Definition: MachO.h:440
llvm::MachO::MH_NLIST_OUTOFSYNC_WITH_DYLDINFO
@ MH_NLIST_OUTOFSYNC_WITH_DYLDINFO
Definition: MachO.h:85
llvm::MachO::N_OSO
@ N_OSO
Definition: MachO.h:369
llvm::MachO::HeaderFileType
HeaderFileType
Definition: MachO.h:40
llvm::MachO::ppc_thread_state32_t::r25
uint32_t r25
Definition: MachO.h:1907
llvm::MachO::x86_float_state64_t::fpu_stmm4
mmst_reg_t fpu_stmm4
Definition: MachO.h:1623
llvm::MachO::BIND_SPECIAL_DYLIB_SELF
@ BIND_SPECIAL_DYLIB_SELF
Definition: MachO.h:256
llvm::MachO::arm_thread_state32_t::cpsr
uint32_t cpsr
Definition: MachO.h:1808
llvm::MachO::nlist_base::n_strx
uint32_t n_strx
Definition: MachO.h:981
llvm::MachO::dylib_table_of_contents::symbol_index
uint32_t symbol_index
Definition: MachO.h:726
llvm::MachO::BIND_OPCODE_ADD_ADDR_ULEB
@ BIND_OPCODE_ADD_ADDR_ULEB
Definition: MachO.h:278
llvm::MachO::REBASE_OPCODE_DO_REBASE_IMM_TIMES
@ REBASE_OPCODE_DO_REBASE_IMM_TIMES
Definition: MachO.h:243
llvm::MachO::fp_status_t::undfl
unsigned short undfl
Definition: MachO.h:1590
llvm::MachO::S_INTERPOSING
@ S_INTERPOSING
S_INTERPOSING - Section with only pairs of function pointers for interposing.
Definition: MachO.h:156
llvm::MachO::ppc_state_hdr_t::flavor
uint32_t flavor
Definition: MachO.h:1966
llvm::MachO::sub_client_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:631
llvm::MachO::CSMAGIC_REQUIREMENT
@ CSMAGIC_REQUIREMENT
Definition: MachO.h:2087
llvm::MachO::VM_PROT_WRITE
@ VM_PROT_WRITE
Definition: MachO.h:488
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:137
llvm::MachO::x86_thread_state32_t::eax
uint32_t eax
Definition: MachO.h:1529
llvm::MachO::tlv_descriptor::key
uintptr_t key
Definition: MachO.h:922
llvm::MachO::fvmlib_command
Definition: MachO.h:604
llvm::MachO::fp_control_t::precis
unsigned short precis
Definition: MachO.h:1586
llvm::MachO::CPU_SUBTYPE_ARM_V6
@ CPU_SUBTYPE_ARM_V6
Definition: MachO.h:1483
llvm::MachO::S_ATTR_SELF_MODIFYING_CODE
@ S_ATTR_SELF_MODIFYING_CODE
S_ATTR_SELF_MODIFYING_CODE - Used with i386 code stubs written on by dyld.
Definition: MachO.h:200
llvm::MachO::BIND_SPECIAL_DYLIB_FLAT_LOOKUP
@ BIND_SPECIAL_DYLIB_FLAT_LOOKUP
Definition: MachO.h:258
llvm::MachO::ppc_thread_state32_t::vrsave
uint32_t vrsave
Definition: MachO.h:1919
llvm::MachO::routines_command::reserved3
uint32_t reserved3
Definition: MachO.h:674
llvm::MachO::CS_CodeDirectory::teamOffset
uint32_t teamOffset
Definition: MachO.h:2171
llvm::MachO::BIND_TYPE_TEXT_ABSOLUTE32
@ BIND_TYPE_TEXT_ABSOLUTE32
Definition: MachO.h:251
llvm::MachO::CPU_SUBTYPE_PENTIUM_4
@ CPU_SUBTYPE_PENTIUM_4
Definition: MachO.h:1459
llvm::MachO::x86_THREAD_STATE64_COUNT
const uint32_t x86_THREAD_STATE64_COUNT
Definition: MachO.h:1789
llvm::MachO::mach_header_64
Definition: MachO.h:519
llvm::MachO::x86_thread_state32_t::ebp
uint32_t ebp
Definition: MachO.h:1535
llvm::MachO::ARM_THUMB_RELOC_BR22
@ ARM_THUMB_RELOC_BR22
Definition: MachO.h:439
llvm::MachO::build_version_command::minos
uint32_t minos
Definition: MachO.h:860
llvm::MachO::CS_HASHTYPE_SHA1
@ CS_HASHTYPE_SHA1
Definition: MachO.h:2126
llvm::MachO::ppc_thread_state32_t::xer
uint32_t xer
Definition: MachO.h:1915
llvm::MachO::CPU_ARCH_ABI64_32
@ CPU_ARCH_ABI64_32
Definition: MachO.h:1414
llvm::MachO::BIND_TYPE_TEXT_PCREL32
@ BIND_TYPE_TEXT_PCREL32
Definition: MachO.h:252
llvm::MachO::x86_thread_state64_t::rbx
uint64_t rbx
Definition: MachO.h:1549
llvm::MachO::X86_64_RELOC_UNSIGNED
@ X86_64_RELOC_UNSIGNED
Definition: MachO.h:474
llvm::MachO::arm_thread_state32_t::pc
uint32_t pc
Definition: MachO.h:1807
llvm::MachO::dylib_command
Definition: MachO.h:617
llvm::MachO::N_EINCL
@ N_EINCL
Definition: MachO.h:377
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:190
llvm::MachO::arm_thread_state64_t::fp
uint64_t fp
Definition: MachO.h:1822
llvm::MachO::symseg_command::size
uint32_t size
Definition: MachO.h:891
llvm::MachO::note_command
Definition: MachO.h:842
llvm::MachO::linkedit_data_command::datasize
uint32_t datasize
Definition: MachO.h:802
llvm::MachO::x86_state_hdr_t::flavor
uint32_t flavor
Definition: MachO.h:1722
llvm::MachO::prebind_cksum_command
Definition: MachO.h:780
llvm::MachO::ppc_thread_state_t::ts32
ppc_thread_state32_t ts32
Definition: MachO.h:1973
llvm::MachO::MH_LAZY_INIT
@ MH_LAZY_INIT
Definition: MachO.h:65
llvm::MachO::sub_umbrella_command::cmd
uint32_t cmd
Definition: MachO.h:636
llvm::MachO::CS_CodeDirectory::execSegFlags
uint64_t execSegFlags
Definition: MachO.h:2180
llvm::MachO::routines_command_64::reserved2
uint64_t reserved2
Definition: MachO.h:686
llvm::MachO::MH_CIGAM_64
@ MH_CIGAM_64
Definition: MachO.h:33
llvm::MachO::PPC_RELOC_VANILLA
@ PPC_RELOC_VANILLA
Definition: MachO.h:413
llvm::MachO::twolevel_hint
Definition: MachO.h:775
llvm::MachO::SECTION_TYPE
@ SECTION_TYPE
Definition: MachO.h:112
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:1886
llvm::MachO::kSecCodeSignatureHashSHA1
@ kSecCodeSignatureHashSHA1
Definition: MachO.h:2199
llvm::MachO::x86_float_state64_t::fpu_xmm0
xmm_reg_t fpu_xmm0
Definition: MachO.h:1627
llvm::MachO::CS_CodeDirectory::version
uint32_t version
Definition: MachO.h:2154
llvm::MachO::CS_EXECSEG_DEBUGGER
@ CS_EXECSEG_DEBUGGER
Definition: MachO.h:2076
llvm::MachO::x86_thread_state32_t::ds
uint32_t ds
Definition: MachO.h:1541
llvm::MachO::ppc_thread_state32_t::r26
uint32_t r26
Definition: MachO.h:1908
llvm::MachO::routines_command::cmd
uint32_t cmd
Definition: MachO.h:668
llvm::MachO::dylinker_command::name
uint32_t name
Definition: MachO.h:659
llvm::MachO::fvmfile_command::cmd
uint32_t cmd
Definition: MachO.h:902
llvm::MachO::DICE_KIND_JUMP_TABLE32
@ DICE_KIND_JUMP_TABLE32
Definition: MachO.h:225
llvm::MachO::CPU_SUBTYPE_ARM_V4T
@ CPU_SUBTYPE_ARM_V4T
Definition: MachO.h:1482
llvm::MachO::x86_float_state64_t::fpu_xmm14
xmm_reg_t fpu_xmm14
Definition: MachO.h:1641
llvm::MachO::relocation_info
Definition: MachO.h:957
llvm::MachO::ppc_thread_state32_t::r16
uint32_t r16
Definition: MachO.h:1898
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:145
llvm::MachO::CS_NVRAM_UNRESTRICTED
@ CS_NVRAM_UNRESTRICTED
Definition: MachO.h:2032
llvm::MachO::fp_status_t::c0
unsigned short c0
Definition: MachO.h:1591
llvm::MachO::CPU_SUBTYPE_ARM_V6M
@ CPU_SUBTYPE_ARM_V6M
Definition: MachO.h:1491
llvm::MachO::section_64::reserved1
uint32_t reserved1
Definition: MachO.h:587
llvm::MachO::fvmfile_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:903
llvm::MachO::version_min_command::cmd
uint32_t cmd
Definition: MachO.h:835
llvm::MachO::BIND_TYPE_POINTER
@ BIND_TYPE_POINTER
Definition: MachO.h:250
llvm::MachO::x86_exception_state64_t::err
uint32_t err
Definition: MachO.h:1650
llvm::MachO::build_version_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:857
llvm::MachO::CS_CodeDirectory::hashType
uint8_t hashType
Definition: MachO.h:2162
llvm::MachO::x86_thread_state64_t::cs
uint64_t cs
Definition: MachO.h:1566
llvm::MachO::ARM64_RELOC_PAGE21
@ ARM64_RELOC_PAGE21
Definition: MachO.h:455
llvm::MachO::routines_command::init_module
uint32_t init_module
Definition: MachO.h:671
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:1474
llvm::MachO::x86_fp_control_precis
x86_fp_control_precis
Definition: MachO.h:1571
llvm::MachO::dylib_module_64::module_name
uint32_t module_name
Definition: MachO.h:747
llvm::MachO::relocation_info::r_type
uint32_t r_type
Definition: MachO.h:960
llvm::MachO::ARM_THREAD_STATE64
@ ARM_THREAD_STATE64
Definition: MachO.h:1863
llvm::MachO::N_INDR
@ N_INDR
Definition: MachO.h:314
llvm::MachO::x86_fp_control_rc
x86_fp_control_rc
Definition: MachO.h:1577
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:959
llvm::MachO::build_tool_version
Definition: MachO.h:850
llvm::MachO::any_relocation_info::r_word0
uint32_t r_word0
Definition: MachO.h:976
llvm::MachO::ppc_thread_state32_t::r20
uint32_t r20
Definition: MachO.h:1902
llvm::MachO::CPU_SUBTYPE_ARM_V7S
@ CPU_SUBTYPE_ARM_V7S
Definition: MachO.h:1489
llvm::MachO::CPU_SUBTYPE_POWERPC_620
@ CPU_SUBTYPE_POWERPC_620
Definition: MachO.h:1515
llvm::MachO::x86_FLOAT_STATE
@ x86_FLOAT_STATE
Definition: MachO.h:1761
llvm::MachO::FAT_MAGIC_64
@ FAT_MAGIC_64
Definition: MachO.h:36
llvm::MachO::CS_ALLOWED_MACHO
@ CS_ALLOWED_MACHO
Definition: MachO.h:2039
llvm::numbers::e
constexpr double e
Definition: MathExtras.h:57
llvm::MachO::N_SO
@ N_SO
Definition: MachO.h:368
llvm::MachO::dyld_info_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:867
llvm::MachO::X86_64_RELOC_GOT
@ X86_64_RELOC_GOT
Definition: MachO.h:478
llvm::MachO::CSMAGIC_EMBEDDED_SIGNATURE_OLD
@ CSMAGIC_EMBEDDED_SIGNATURE_OLD
Definition: MachO.h:2092
llvm::MachO::REBASE_OPCODE_ADD_ADDR_IMM_SCALED
@ REBASE_OPCODE_ADD_ADDR_IMM_SCALED
Definition: MachO.h:242
llvm::MachO::MH_OBJECT
@ MH_OBJECT
Definition: MachO.h:43
llvm::MachO::CPU_TYPE_X86
@ CPU_TYPE_X86
Definition: MachO.h:1420
llvm::MachO::fat_arch::offset
uint32_t offset
Definition: MachO.h:942
llvm::MachO::CPU_SUBTYPE_POWERPC_750
@ CPU_SUBTYPE_POWERPC_750
Definition: MachO.h:1516
llvm::MachO::X86_64_RELOC_GOT_LOAD
@ X86_64_RELOC_GOT_LOAD
Definition: MachO.h:477
llvm::MachO::ppc_thread_state32_t::r27
uint32_t r27
Definition: MachO.h:1909
llvm::MachO::N_LCSYM
@ N_LCSYM
Definition: MachO.h:359
llvm::MachO::x86_exception_state_t::esh
x86_state_hdr_t esh
Definition: MachO.h:1742
llvm::MachO::CPU_SUBTYPE_X86_64_H
@ CPU_SUBTYPE_X86_64_H
Definition: MachO.h:1469
llvm::MachO::scattered_relocation_info::r_address
uint32_t r_address
Definition: MachO.h:968
llvm::MachO::tlv_descriptor_64::offset
uint64_t offset
Definition: MachO.h:917
llvm::MachO::CS_ENTITLEMENT_FLAGS
@ CS_ENTITLEMENT_FLAGS
Definition: MachO.h:2066
llvm::MachO::sub_library_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:643
llvm::MachO::CS_ADHOC
@ CS_ADHOC
Definition: MachO.h:2014
llvm::MachO::CPU_SUBTYPE_PENTIUM_4_M
@ CPU_SUBTYPE_PENTIUM_4_M
Definition: MachO.h:1460
llvm::MachO::nlist_base::n_type
uint8_t n_type
Definition: MachO.h:982
llvm::MachO::CPU_SUBTYPE_LIB64
@ CPU_SUBTYPE_LIB64
Definition: MachO.h:1436
llvm::MachO::section::reserved1
uint32_t reserved1
Definition: MachO.h:573
llvm::MachO::prebind_cksum_command::cksum
uint32_t cksum
Definition: MachO.h:783
llvm::MachO::dyld_info_command::weak_bind_size
uint32_t weak_bind_size
Definition: MachO.h:873
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:193
llvm::MachO::ppc_thread_state_t::uts
union llvm::MachO::ppc_thread_state_t::@142 uts
llvm::MachO::CPU_TYPE_ARM64
@ CPU_TYPE_ARM64
Definition: MachO.h:1426
llvm::MachO::CPU_SUBTYPE_386
@ CPU_SUBTYPE_386
Definition: MachO.h:1445
llvm::MachO::REBASE_OPCODE_MASK
@ REBASE_OPCODE_MASK
Definition: MachO.h:235
llvm::MachO::x86_float_state64_t::fpu_stmm1
mmst_reg_t fpu_stmm1
Definition: MachO.h:1620
llvm::MachO::MH_NO_REEXPORTED_DYLIBS
@ MH_NO_REEXPORTED_DYLIBS
Definition: MachO.h:79
llvm::MachO::dyld_info_command::lazy_bind_off
uint32_t lazy_bind_off
Definition: MachO.h:874
llvm::MachO::x86_float_state64_t::fpu_ip
uint32_t fpu_ip
Definition: MachO.h:1611
llvm::MachO::CS_BlobIndex::type
uint32_t type
Definition: MachO.h:2186
llvm::MachO::x86_FP_PREC_53B
@ x86_FP_PREC_53B
Definition: MachO.h:1573
llvm::MachO::REBASE_OPCODE_DO_REBASE_ULEB_TIMES
@ REBASE_OPCODE_DO_REBASE_ULEB_TIMES
Definition: MachO.h:244
llvm::MachO::ppc_thread_state32_t::r15
uint32_t r15
Definition: MachO.h:1897
llvm::MachO::PLATFORM_BRIDGEOS
@ PLATFORM_BRIDGEOS
Definition: MachO.h:496
llvm::MachO::build_version_command::cmd
uint32_t cmd
Definition: MachO.h:856
llvm::MachO::segment_command_64::fileoff
uint64_t fileoff
Definition: MachO.h:555
llvm::MachO::linker_option_command
Definition: MachO.h:880
llvm::MachO::x86_thread_state64_t
Definition: MachO.h:1547
llvm::MachO::dyld_info_command::bind_size
uint32_t bind_size
Definition: MachO.h:871
llvm::MachO::arm_thread_state32_t::sp
uint32_t sp
Definition: MachO.h:1805
llvm::MachO::REFERENCE_FLAG_UNDEFINED_LAZY
@ REFERENCE_FLAG_UNDEFINED_LAZY
Definition: MachO.h:330
llvm::MachO::CPU_SUBTYPE_ARM64_ALL
@ CPU_SUBTYPE_ARM64_ALL
Definition: MachO.h:1497
llvm::MachO::N_STAB
@ N_STAB
Definition: MachO.h:301
llvm::MachO::fvmfile_command
Definition: MachO.h:901
llvm::MachO::prebound_dylib_command::linked_modules
uint32_t linked_modules
Definition: MachO.h:653
llvm::MachO::dylib_table_of_contents::module_index
uint32_t module_index
Definition: MachO.h:727
llvm::MachO::MH_DYLINKER
@ MH_DYLINKER
Definition: MachO.h:49
llvm::MachO::x86_FP_RND_NEAR
@ x86_FP_RND_NEAR
Definition: MachO.h:1578
llvm::MachO::S_4BYTE_LITERALS
@ S_4BYTE_LITERALS
S_4BYTE_LITERALS - Section with 4 byte literals.
Definition: MachO.h:131
llvm::MachO::CS_EXEC_SET_ENFORCEMENT
@ CS_EXEC_SET_ENFORCEMENT
Definition: MachO.h:2045
llvm::MachO::build_version_command::platform
uint32_t platform
Definition: MachO.h:859
llvm::MachO::fvmfile_command::name
uint32_t name
Definition: MachO.h:904
llvm::MachO::RebaseType
RebaseType
Definition: MachO.h:229
llvm::MachO::dysymtab_command::modtaboff
uint32_t modtaboff
Definition: MachO.h:713
llvm::MachO::N_AST
@ N_AST
Definition: MachO.h:362
llvm::MachO::MH_KEXT_BUNDLE
@ MH_KEXT_BUNDLE
Definition: MachO.h:53
llvm::MachO::nlist::n_desc
int16_t n_desc
Definition: MachO.h:991
llvm::MachO::S_THREAD_LOCAL_VARIABLES
@ S_THREAD_LOCAL_VARIABLES
S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.
Definition: MachO.h:170
llvm::MachO::S_THREAD_LOCAL_REGULAR
@ S_THREAD_LOCAL_REGULAR
S_THREAD_LOCAL_REGULAR - Thread local data section.
Definition: MachO.h:165
llvm::MachO::MH_INCRLINK
@ MH_INCRLINK
Definition: MachO.h:60
llvm::MachO::fp_status_t::c2
unsigned short c2
Definition: MachO.h:1591
llvm::MachO::routines_command::reserved5
uint32_t reserved5
Definition: MachO.h:676
llvm::MachO::CS_CodeDirectory::spare2
uint32_t spare2
Definition: MachO.h:2165
llvm::MachO::dylinker_command::cmd
uint32_t cmd
Definition: MachO.h:657
llvm::MachO::dylib_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:619
llvm::MachO::x86_thread_state64_t::rsp
uint64_t rsp
Definition: MachO.h:1555
llvm::MachO::ppc_thread_state32_t::r3
uint32_t r3
Definition: MachO.h:1885
llvm::MachO::symseg_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:889
llvm::MachO::dysymtab_command::nlocrel
uint32_t nlocrel
Definition: MachO.h:722
llvm::MachO::segment_command
Definition: MachO.h:535
llvm::MachO::ARM64_RELOC_POINTER_TO_GOT
@ ARM64_RELOC_POINTER_TO_GOT
Definition: MachO.h:463
llvm::MachO::MH_SUBSECTIONS_VIA_SYMBOLS
@ MH_SUBSECTIONS_VIA_SYMBOLS
Definition: MachO.h:72
llvm::MachO::EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER
@ EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER
Definition: MachO.h:289
llvm::MachO::CPU_SUBTYPE_POWERPC_601
@ CPU_SUBTYPE_POWERPC_601
Definition: MachO.h:1508
llvm::MachO::CS_SUPPL_SIGNER_TYPE_LOCAL
@ CS_SUPPL_SIGNER_TYPE_LOCAL
Definition: MachO.h:2148
llvm::MachO::fp_status_t::zdiv
unsigned short zdiv
Definition: MachO.h:1590
llvm::MachO::CS_RESTRICT
@ CS_RESTRICT
Definition: MachO.h:2026
llvm::MachO::arm_thread_state64_t
Definition: MachO.h:1820
llvm::MachO::kSecCodeSignatureHashSHA256Truncated
@ kSecCodeSignatureHashSHA256Truncated
Definition: MachO.h:2201
llvm::MachO::twolevel_hint::isub_image
uint32_t isub_image
Definition: MachO.h:776
llvm::MachO::dylinker_command
Definition: MachO.h:656
llvm::MachO::RebaseOpcode
RebaseOpcode
Definition: MachO.h:237
llvm::MachO::x86_FP_CHOP
@ x86_FP_CHOP
Definition: MachO.h:1581
llvm::MachO::dysymtab_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:704
llvm::MachO::ARM_THREAD_STATE
@ ARM_THREAD_STATE
Definition: MachO.h:1858
llvm::MachO::fat_arch_64::cpusubtype
uint32_t cpusubtype
Definition: MachO.h:949
llvm::MachO::N_TYPE
@ N_TYPE
Definition: MachO.h:303
llvm::MachO::section::flags
uint32_t flags
Definition: MachO.h:572
llvm::MachO::N_LSYM
@ N_LSYM
Definition: MachO.h:370
llvm::MachO::encryption_info_command::cryptid
uint32_t cryptid
Definition: MachO.h:822
llvm::MachO::N_FNAME
@ N_FNAME
Definition: MachO.h:356
llvm::MachO::x86_float_state64_t::fpu_mxcsr
uint32_t fpu_mxcsr
Definition: MachO.h:1617
llvm::MachO::SELF_LIBRARY_ORDINAL
@ SELF_LIBRARY_ORDINAL
Definition: MachO.h:346
llvm::MachO::x86_FLOAT_STATE64_COUNT
const uint32_t x86_FLOAT_STATE64_COUNT
Definition: MachO.h:1791
llvm::MachO::X86ThreadFlavors
X86ThreadFlavors
Definition: MachO.h:1753
info
lazy value info
Definition: LazyValueInfo.cpp:59
llvm::MachO::GENERIC_RELOC_TLV
@ GENERIC_RELOC_TLV
Definition: MachO.h:408
llvm::MachO::X86_64_RELOC_SUBTRACTOR
@ X86_64_RELOC_SUBTRACTOR
Definition: MachO.h:479
llvm::MachO::note_command::size
uint64_t size
Definition: MachO.h:847
llvm::MachO::x86_EXCEPTION_STATE32
@ x86_EXCEPTION_STATE32
Definition: MachO.h:1756
llvm::MachO::CPU_ARCH_MASK
@ CPU_ARCH_MASK
Definition: MachO.h:1412
llvm::MachO::segment_command::vmaddr
uint32_t vmaddr
Definition: MachO.h:539
llvm::MachO::x86_EXCEPTION_STATE_COUNT
const uint32_t x86_EXCEPTION_STATE_COUNT
Definition: MachO.h:1800
llvm::MachO::REBASE_OPCODE_DONE
@ REBASE_OPCODE_DONE
Definition: MachO.h:238
llvm::MachO::CS_DYLD_PLATFORM
@ CS_DYLD_PLATFORM
Definition: MachO.h:2051
llvm::MachO::dylib_command::cmd
uint32_t cmd
Definition: MachO.h:618
llvm::MachO::CPU_SUBTYPE_CELERON
@ CPU_SUBTYPE_CELERON
Definition: MachO.h:1453
llvm::MachO::dysymtab_command::extrefsymoff
uint32_t extrefsymoff
Definition: MachO.h:715
llvm::MachO::FAT_CIGAM_64
@ FAT_CIGAM_64
Definition: MachO.h:37
llvm::MachO::load_command
Definition: MachO.h:530
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:272
llvm::MachO::CS_EXECSEG_ALLOW_UNSIGNED
@ CS_EXECSEG_ALLOW_UNSIGNED
Definition: MachO.h:2075
llvm::MachO::CS_INSTALLER
@ CS_INSTALLER
Definition: MachO.h:2016
llvm::MachO::ARM_DEBUG_STATE
@ ARM_DEBUG_STATE
Definition: MachO.h:1861
llvm::MachO::nlist::n_strx
uint32_t n_strx
Definition: MachO.h:988
llvm::MachO::section::reloff
uint32_t reloff
Definition: MachO.h:570
llvm::MachO::prebound_dylib_command::nmodules
uint32_t nmodules
Definition: MachO.h:652
llvm::MachO::ARN_THREAD_STATE_NONE
@ ARN_THREAD_STATE_NONE
Definition: MachO.h:1862
llvm::MachO::CS_KILL
@ CS_KILL
Definition: MachO.h:2024
llvm::MachO::CS_EXECSEG_SKIP_LV
@ CS_EXECSEG_SKIP_LV
Definition: MachO.h:2078
llvm::MachO::CSTYPE_INDEX_REQUIREMENTS
@ CSTYPE_INDEX_REQUIREMENTS
Definition: MachO.h:2123
llvm::MachO::x86_exception_state64_t
Definition: MachO.h:1647
llvm::MachO::x86_float_state64_t::fpu_stmm6
mmst_reg_t fpu_stmm6
Definition: MachO.h:1625
llvm::MachO::fvmlib_command::cmd
uint32_t cmd
Definition: MachO.h:605
llvm::MachO::CPU_SUBTYPE_586
@ CPU_SUBTYPE_586
Definition: MachO.h:1448
llvm::MachO::x86_thread_state64_t::rsi
uint64_t rsi
Definition: MachO.h:1553
llvm::MachO::scattered_relocation_info::r_scattered
uint32_t r_scattered
Definition: MachO.h:969
llvm::MachO::x86_thread_state64_t::r12
uint64_t r12
Definition: MachO.h:1560
llvm::MachO::x86_float_state64_t::fpu_xmm2
xmm_reg_t fpu_xmm2
Definition: MachO.h:1629
llvm::MachO::mmst_reg_t
Definition: MachO.h:1595
llvm::MachO::mach_header::sizeofcmds
uint32_t sizeofcmds
Definition: MachO.h:515
llvm::MachO::PPC_RELOC_PB_LA_PTR
@ PPC_RELOC_PB_LA_PTR
Definition: MachO.h:422
llvm::MachO::CS_CodeDirectory::platform
uint8_t platform
Definition: MachO.h:2163
llvm::MachO::dysymtab_command::iextdefsym
uint32_t iextdefsym
Definition: MachO.h:707
llvm::MachO::symtab_command::cmd
uint32_t cmd
Definition: MachO.h:694
llvm::MachO::CPU_SUBTYPE_ARM_XSCALE
@ CPU_SUBTYPE_ARM_XSCALE
Definition: MachO.h:1486
llvm::MachO::N_SECT
@ N_SECT
Definition: MachO.h:312
llvm::MachO::x86_float_state64_t::fpu_cs
uint16_t fpu_cs
Definition: MachO.h:1612
llvm::MachO::symseg_command::offset
uint32_t offset
Definition: MachO.h:890
llvm::MachO::CPU_SUBTYPE_POWERPC_604
@ CPU_SUBTYPE_POWERPC_604
Definition: MachO.h:1513
llvm::MachO::scattered_relocation_info::r_length
uint32_t r_length
Definition: MachO.h:968
llvm::MachO::BIND_OPCODE_SET_ADDEND_SLEB
@ BIND_OPCODE_SET_ADDEND_SLEB
Definition: MachO.h:276
llvm::MachO::CPU_SUBTYPE_MC980000_ALL
@ CPU_SUBTYPE_MC980000_ALL
Definition: MachO.h:1521
llvm::MachO::fp_control_t::undfl
unsigned short undfl
Definition: MachO.h:1585
llvm::MachO::x86_thread_state32_t::ecx
uint32_t ecx
Definition: MachO.h:1531
llvm::MachO::linkedit_data_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:800
llvm::MachO::DataRegionType
DataRegionType
Definition: MachO.h:220
llvm::MachO::MH_DEAD_STRIPPABLE_DYLIB
@ MH_DEAD_STRIPPABLE_DYLIB
Definition: MachO.h:81
llvm::MachO::dyld_info_command::rebase_size
uint32_t rebase_size
Definition: MachO.h:869
uint32_t
Compiler.h
llvm::MachO::SG_PROTECTED_VERSION_1
@ SG_PROTECTED_VERSION_1
Definition: MachO.h:108
llvm::MachO::twolevel_hints_command::offset
uint32_t offset
Definition: MachO.h:770
llvm::MachO::arm_thread_state64_t::x
uint64_t x[29]
Definition: MachO.h:1821
llvm::MachO::x86_thread_state32_t::gs
uint32_t gs
Definition: MachO.h:1544
llvm::MachO::segment_command_64
Definition: MachO.h:549
llvm::MachO::BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE
@ BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE
Definition: MachO.h:257
llvm::MachO::CPU_SUBTYPE_INTEL_FAMILY_MAX
@ CPU_SUBTYPE_INTEL_FAMILY_MAX
Definition: MachO.h:1478
llvm::MachO::arm_state_hdr_t::flavor
uint32_t flavor
Definition: MachO.h:1841
llvm::MachO::dylib_module_64::nextrel
uint32_t nextrel
Definition: MachO.h:755
llvm::MachO::x86_thread_state_t::ts64
x86_thread_state64_t ts64
Definition: MachO.h:1729
llvm::MachO::x86_float_state_t::fs64
x86_float_state64_t fs64
Definition: MachO.h:1737
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:1554
llvm::MachO::FAT_CIGAM
@ FAT_CIGAM
Definition: MachO.h:35
llvm::MachO::ARM_RELOC_VANILLA
@ ARM_RELOC_VANILLA
Definition: MachO.h:433
llvm::MachO::arm_thread_state32_t
Definition: MachO.h:1803
llvm::MachO::section_64::reserved3
uint32_t reserved3
Definition: MachO.h:589
llvm::MachO::x86_float_state64_t::fpu_rsrv2
uint16_t fpu_rsrv2
Definition: MachO.h:1613
llvm::MachO::x86_float_state64_t::fpu_dp
uint32_t fpu_dp
Definition: MachO.h:1614
llvm::MachO::dylib_module_64::objc_module_info_size
uint32_t objc_module_info_size
Definition: MachO.h:758
llvm::MachO::note_command::offset
uint64_t offset
Definition: MachO.h:846
llvm::MachO::tlv_descriptor_32
Definition: MachO.h:908
llvm::MachO::sub_library_command::sub_library
uint32_t sub_library
Definition: MachO.h:644
llvm::MachO::S_DTRACE_DOF
@ S_DTRACE_DOF
S_DTRACE_DOF - Section contains DTrace Object Format.
Definition: MachO.h:160
llvm::MachO::N_ABS
@ N_ABS
Definition: MachO.h:311
llvm::MachO::CPUSubTypeARM64
CPUSubTypeARM64
Definition: MachO.h:1496
llvm::MachO::nlist_base::n_desc
uint16_t n_desc
Definition: MachO.h:984
llvm::MachO::x86_thread_state32_t::cs
uint32_t cs
Definition: MachO.h:1540
llvm::MachO::GENERIC_RELOC_LOCAL_SECTDIFF
@ GENERIC_RELOC_LOCAL_SECTDIFF
Definition: MachO.h:407
llvm::MachO::x86_thread_state64_t::rdx
uint64_t rdx
Definition: MachO.h:1551
llvm::MachO::REFERENCED_DYNAMICALLY
@ REFERENCED_DYNAMICALLY
Definition: MachO.h:337
llvm::MachO::RelocationInfoType
RelocationInfoType
Definition: MachO.h:398
llvm::MachO::EXPORT_SYMBOL_FLAGS_REEXPORT
@ EXPORT_SYMBOL_FLAGS_REEXPORT
Definition: MachO.h:288
llvm::MachO::x86_float_state64_t::fpu_xmm8
xmm_reg_t fpu_xmm8
Definition: MachO.h:1635
llvm::MachO::ppc_thread_state32_t::srr1
uint32_t srr1
Definition: MachO.h:1881
llvm::MachO::x86_thread_state_t::tsh
x86_state_hdr_t tsh
Definition: MachO.h:1727
llvm::MachO::S_ATTR_NO_DEAD_STRIP
@ S_ATTR_NO_DEAD_STRIP
S_ATTR_NO_DEAD_STRIP - No dead stripping.
Definition: MachO.h:195
llvm::MachO::REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB
@ REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB
Definition: MachO.h:245
llvm::MachO::LAST_KNOWN_SECTION_TYPE
@ LAST_KNOWN_SECTION_TYPE
Definition: MachO.h:178
llvm::MachO::CPU_SUBTYPE_MC98601
@ CPU_SUBTYPE_MC98601
Definition: MachO.h:1522
llvm::MachO::x86_thread_state64_t::r9
uint64_t r9
Definition: MachO.h:1557
llvm::MachO::S_16BYTE_LITERALS
@ S_16BYTE_LITERALS
S_16BYTE_LITERALS - Section with only 16 byte literals.
Definition: MachO.h:158
llvm::MachO::NListType
NListType
Definition: MachO.h:307
llvm::MachO::dyld_info_command::weak_bind_off
uint32_t weak_bind_off
Definition: MachO.h:872
llvm::MachO::x86_thread_state32_t::eip
uint32_t eip
Definition: MachO.h:1539
llvm::MachO::CS_SuperBlob::length
uint32_t length
Definition: MachO.h:2192
llvm::MachO::xmm_reg_t
Definition: MachO.h:1600
llvm::MachO::ppc_thread_state32_t::r30
uint32_t r30
Definition: MachO.h:1912
llvm::MachO::PLATFORM_TVOS
@ PLATFORM_TVOS
Definition: MachO.h:494
llvm::MachO::x86_THREAD_STATE_COUNT
const uint32_t x86_THREAD_STATE_COUNT
Definition: MachO.h:1796
llvm::MachO::dysymtab_command::nextrefsyms
uint32_t nextrefsyms
Definition: MachO.h:716
llvm::MachO::CPU_SUBTYPE_PENTIUM_3_XEON
@ CPU_SUBTYPE_PENTIUM_3_XEON
Definition: MachO.h:1457
llvm::MachO::X86_64_RELOC_SIGNED
@ X86_64_RELOC_SIGNED
Definition: MachO.h:475
llvm::MachO::CSSLOT_SIGNATURESLOT
@ CSSLOT_SIGNATURESLOT
Definition: MachO.h:2119
llvm::MachO::linker_option_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:882
llvm::MachO::CPU_SUBTYPE_PENTIUM_3_M
@ CPU_SUBTYPE_PENTIUM_3_M
Definition: MachO.h:1456
llvm::MachO::encryption_info_command_64
Definition: MachO.h:825
llvm::MachO::MH_DYLIB_STUB
@ MH_DYLIB_STUB
Definition: MachO.h:51
llvm::MachO::dylib_module_64::nextdefsym
uint32_t nextdefsym
Definition: MachO.h:749
llvm::MachO::BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB
@ BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB
Definition: MachO.h:282
llvm::MachO::segment_command_64::cmdsize
uint32_t cmdsize
Definition: MachO.h:551
llvm::MachO::CPU_SUBTYPE_ARM_ALL
@ CPU_SUBTYPE_ARM_ALL
Definition: MachO.h:1481
llvm::MachO::CS_HASHTYPE_SHA256
@ CS_HASHTYPE_SHA256
Definition: MachO.h:2127
llvm::MachO::MH_ALLOW_STACK_EXECUTION
@ MH_ALLOW_STACK_EXECUTION
Definition: MachO.h:76
llvm::MachO::dysymtab_command
Definition: MachO.h:702
llvm::MachO::x86_float_state64_t::fpu_fcw
fp_control_t fpu_fcw
Definition: MachO.h:1606
llvm::MachO::ppc_thread_state32_t::lr
uint32_t lr
Definition: MachO.h:1916
llvm::MachO::dylib_reference
Definition: MachO.h:762
llvm::MachO::CSSLOT_IDENTIFICATIONSLOT
@ CSSLOT_IDENTIFICATIONSLOT
Definition: MachO.h:2120
llvm::MachO::segment_command::maxprot
uint32_t maxprot
Definition: MachO.h:543
llvm::MachO::dylib::timestamp
uint32_t timestamp
Definition: MachO.h:612
llvm::MachO::SECTION_ATTRIBUTES_SYS
@ SECTION_ATTRIBUTES_SYS
Definition: MachO.h:115
llvm::MachO::x86_exception_state64_t::cpu
uint16_t cpu
Definition: MachO.h:1649
llvm::MachO::x86_state_hdr_t
Definition: MachO.h:1721
llvm::MachO::mmst_reg_t::mmst_rsrv
char mmst_rsrv[6]
Definition: MachO.h:1597
llvm::MachO::CSMAGIC_REQUIREMENTS
@ CSMAGIC_REQUIREMENTS
Definition: MachO.h:2088
llvm::MachO::CS_CodeDirectory
Definition: MachO.h:2151
llvm::MachO::dylib_reference::isym
uint32_t isym
Definition: MachO.h:763
llvm::MachO::dyld_info_command::cmd
uint32_t cmd
Definition: MachO.h:866
llvm::MachO::section_64
Definition: MachO.h:577
llvm::MachO::CS_PLATFORM_PATH
@ CS_PLATFORM_PATH
Definition: MachO.h:2054
llvm::MachO::ppc_thread_state32_t::r19
uint32_t r19
Definition: MachO.h:1901
llvm::MachO::VM_PROT_EXECUTE
@ VM_PROT_EXECUTE
Definition: MachO.h:488
llvm::MachO::CS_DEV_CODE
@ CS_DEV_CODE
Definition: MachO.h:2060
llvm::MachO::CPU_SUBTYPE_486
@ CPU_SUBTYPE_486
Definition: MachO.h:1446
llvm::MachO::MH_DYLIB
@ MH_DYLIB
Definition: MachO.h:48
llvm::MachO::CS_CodeDirectory::spare3
uint32_t spare3
Definition: MachO.h:2174
llvm::MachO::X86_64_RELOC_TLV
@ X86_64_RELOC_TLV
Definition: MachO.h:483
llvm::MachO::CSSLOT_ALTERNATE_CODEDIRECTORIES
@ CSSLOT_ALTERNATE_CODEDIRECTORIES
Definition: MachO.h:2112
llvm::MachO::CPUSubTypePowerPC
CPUSubTypePowerPC
Definition: MachO.h:1506
llvm::MachO::CPU_SUBTYPE_ARM64_32_V8
@ CPU_SUBTYPE_ARM64_32_V8
Definition: MachO.h:1502
llvm::MachO::x86_DEBUG_STATE32
@ x86_DEBUG_STATE32
Definition: MachO.h:1763
llvm::MachO::ppc_thread_state32_t::srr0
uint32_t srr0
Definition: MachO.h:1880
llvm::MachO::MH_HAS_TLV_DESCRIPTORS
@ MH_HAS_TLV_DESCRIPTORS
Definition: MachO.h:82
H
#define H(x, y, z)
Definition: MD5.cpp:58
llvm::MachO::CPU_SUBTYPE_POWERPC_7400
@ CPU_SUBTYPE_POWERPC_7400
Definition: MachO.h:1517
llvm::MachO::nlist_base
Definition: MachO.h:980
llvm::MachO::PPC_RELOC_HI16
@ PPC_RELOC_HI16
Definition: MachO.h:417
llvm::MachO::kSecCodeSignatureNoHash
@ kSecCodeSignatureNoHash
Definition: MachO.h:2198
uint16_t
llvm::MachO::load_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:532
llvm::MachO::fvmlib_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:606
llvm::MachO::ppc_thread_state32_t::r13
uint32_t r13
Definition: MachO.h:1895
llvm::MachO::PLATFORM_TVOSSIMULATOR
@ PLATFORM_TVOSSIMULATOR
Definition: MachO.h:499
llvm::MachO::x86_float_state64_t::fpu_reserved1
uint32_t fpu_reserved1
Definition: MachO.h:1644
llvm::MachO::dylib_module::ilocalsym
uint32_t ilocalsym
Definition: MachO.h:736
llvm::MachO::N_FUN
@ N_FUN
Definition: MachO.h:357
llvm::MachO::CPU_SUBTYPE_POWERPC_603e
@ CPU_SUBTYPE_POWERPC_603e
Definition: MachO.h:1511
llvm::MachO::PPC_RELOC_LOCAL_SECTDIFF
@ PPC_RELOC_LOCAL_SECTDIFF
Definition: MachO.h:428
llvm::MachO::N_BINCL
@ N_BINCL
Definition: MachO.h:371
llvm::MachO::routines_command::reserved6
uint32_t reserved6
Definition: MachO.h:677
llvm::MachO::fp_status_t::stkflt
unsigned short stkflt
Definition: MachO.h:1591
llvm::MachO::routines_command::reserved2
uint32_t reserved2
Definition: MachO.h:673
llvm::MachO::CS_SHA1_LEN
@ CS_SHA1_LEN
Definition: MachO.h:2131
llvm::MachO::S_THREAD_LOCAL_VARIABLE_POINTERS
@ S_THREAD_LOCAL_VARIABLE_POINTERS
S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread local structures.
Definition: MachO.h:173
llvm::MachO::CPUSubTypeSPARC
CPUSubTypeSPARC
Definition: MachO.h:1504
llvm::MachO::EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL
@ EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL
Definition: MachO.h:294
llvm::MachO::segment_command::nsects
uint32_t nsects
Definition: MachO.h:545
llvm::MachO::dysymtab_command::extreloff
uint32_t extreloff
Definition: MachO.h:719
llvm::MachO::CPU_TYPE_ARM64_32
@ CPU_TYPE_ARM64_32
Definition: MachO.h:1427
llvm::MachO::ppc_thread_state32_t::r24
uint32_t r24
Definition: MachO.h:1906
llvm::MachO::MH_PREBOUND
@ MH_PREBOUND
Definition: MachO.h:63
llvm::MachO::dylib_module::nlocalsym
uint32_t nlocalsym
Definition: MachO.h:737
llvm::MachO::CS_HARD
@ CS_HARD
Definition: MachO.h:2023
llvm::MachO::symtab_command::stroff
uint32_t stroff
Definition: MachO.h:698
llvm::MachO::REFERENCE_TYPE
@ REFERENCE_TYPE
Definition: MachO.h:328
llvm::MachO::symseg_command
Definition: MachO.h:887
llvm::MachO::routines_command_64
Definition: MachO.h:680
llvm::MachO::segment_command_64::filesize
uint64_t filesize
Definition: MachO.h:556
llvm::MachO::source_version_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:813
llvm::MachO::x86_FLOAT_STATE64
@ x86_FLOAT_STATE64
Definition: MachO.h:1758
llvm::MachO::entry_point_command
Definition: MachO.h:926
llvm::MachO::encryption_info_command::cmd
uint32_t cmd
Definition: MachO.h:818
llvm::MachO::x86_float_state64_t::fpu_stmm5
mmst_reg_t fpu_stmm5
Definition: MachO.h:1624
llvm::MachO::CPU_SUBTYPE_ITANIUM_2
@ CPU_SUBTYPE_ITANIUM_2
Definition: MachO.h:1462
llvm::MachO::x86_thread_state32_t::ebx
uint32_t ebx
Definition: MachO.h:1530
llvm::MachO::REBASE_TYPE_TEXT_ABSOLUTE32
@ REBASE_TYPE_TEXT_ABSOLUTE32
Definition: MachO.h:231
x
TODO unsigned x
Definition: README.txt:10
llvm::MachO::x86_float_state64_t::fpu_xmm13
xmm_reg_t fpu_xmm13
Definition: MachO.h:1640
llvm::MachO::tlv_descriptor
Definition: MachO.h:920
llvm::MachO::x86_thread_state_t
Definition: MachO.h:1726
llvm::MachO::mach_header
Definition: MachO.h:509
llvm::MachO::dylinker_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:658
llvm::MachO::ARM_RELOC_HALF_SECTDIFF
@ ARM_RELOC_HALF_SECTDIFF
Definition: MachO.h:442
llvm::MachO::N_SLINE
@ N_SLINE
Definition: MachO.h:365
llvm::MachO::dylib_module_64::irefsym
uint32_t irefsym
Definition: MachO.h:750
llvm::MachO::nlist_base::n_sect
uint8_t n_sect
Definition: MachO.h:983
llvm::MachO::PPC_RELOC_HI16_SECTDIFF
@ PPC_RELOC_HI16_SECTDIFF
Definition: MachO.h:423
llvm::MachO::REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY
@ REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY
Definition: MachO.h:334
llvm::MachO::section_64::reloff
uint32_t reloff
Definition: MachO.h:584
llvm::MachO::routines_command_64::reserved3
uint64_t reserved3
Definition: MachO.h:687
llvm::MachO::CPU_SUBTYPE_PENTII_M3
@ CPU_SUBTYPE_PENTII_M3
Definition: MachO.h:1451
llvm::MachO::dylib_module_64::ninit_nterm
uint32_t ninit_nterm
Definition: MachO.h:757
llvm::MachO::N_BCOMM
@ N_BCOMM
Definition: MachO.h:382
llvm::MachO::N_ALT_ENTRY
@ N_ALT_ENTRY
Definition: MachO.h:342
llvm::MachO::NO_SECT
@ NO_SECT
Definition: MachO.h:320
llvm::MachO::segment_command_64::vmaddr
uint64_t vmaddr
Definition: MachO.h:553
llvm::MachO::dysymtab_command::ilocalsym
uint32_t ilocalsym
Definition: MachO.h:705
llvm::MachO::CS_GET_TASK_ALLOW
@ CS_GET_TASK_ALLOW
Definition: MachO.h:2015
llvm::MachO::encryption_info_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:819
llvm::MachO::R_ABS
@ R_ABS
Definition: MachO.h:391
llvm::MachO::x86_thread_state64_t::r10
uint64_t r10
Definition: MachO.h:1558
llvm::MachO::x86_thread_state32_t::esp
uint32_t esp
Definition: MachO.h:1536
llvm::MachO::x86_FP_RND_UP
@ x86_FP_RND_UP
Definition: MachO.h:1580
llvm::MachO::dylib_module::objc_module_info_addr
uint32_t objc_module_info_addr
Definition: MachO.h:742
llvm::MachO::CS_SUPPORTSCODELIMIT64
@ CS_SUPPORTSCODELIMIT64
Definition: MachO.h:2100
llvm::MachO::dylib::current_version
uint32_t current_version
Definition: MachO.h:613
llvm::MachO::ARM_RELOC_PAIR
@ ARM_RELOC_PAIR
Definition: MachO.h:434
llvm::MachO::SG_NORELOC
@ SG_NORELOC
Definition: MachO.h:107
llvm::MachO::S_THREAD_LOCAL_ZEROFILL
@ S_THREAD_LOCAL_ZEROFILL
S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.
Definition: MachO.h:167
llvm::MachO::CSSLOT_RESOURCEDIR
@ CSSLOT_RESOURCEDIR
Definition: MachO.h:2108
llvm::MachO::ident_command::cmd
uint32_t cmd
Definition: MachO.h:896
llvm::MachO::N_BNSYM
@ N_BNSYM
Definition: MachO.h:360
llvm::MachO::PLATFORM_WATCHOS
@ PLATFORM_WATCHOS
Definition: MachO.h:495
llvm::MachO::ARM64_RELOC_PAGEOFF12
@ ARM64_RELOC_PAGEOFF12
Definition: MachO.h:457
llvm::MachO::CPU_SUBTYPE_XEON
@ CPU_SUBTYPE_XEON
Definition: MachO.h:1463
llvm::MachO::GENERIC_RELOC_PB_LA_PTR
@ GENERIC_RELOC_PB_LA_PTR
Definition: MachO.h:406
llvm::MachO::tlv_descriptor_64::key
uint64_t key
Definition: MachO.h:916
llvm::MachO::x86_float_state64_t::fpu_ds
uint16_t fpu_ds
Definition: MachO.h:1615
llvm::MachO::CS_CHECK_EXPIRATION
@ CS_CHECK_EXPIRATION
Definition: MachO.h:2025
llvm::MachO::CPU_SUBTYPE_X86_64_ALL
@ CPU_SUBTYPE_X86_64_ALL
Definition: MachO.h:1467
llvm::MachO::PPC_RELOC_BR24
@ PPC_RELOC_BR24
Definition: MachO.h:416
llvm::MachO::sub_client_command::cmd
uint32_t cmd
Definition: MachO.h:630
llvm::MachO::routines_command_64::init_module
uint64_t init_module
Definition: MachO.h:684
llvm::MachO::x86_thread_state64_t::r8
uint64_t r8
Definition: MachO.h:1556
llvm::MachO::MH_PRELOAD
@ MH_PRELOAD
Definition: MachO.h:47
llvm::MachO::INDIRECT_SYMBOL_ABS
@ INDIRECT_SYMBOL_ABS
Definition: MachO.h:217
llvm::MachO::sub_client_command::client
uint32_t client
Definition: MachO.h:632
llvm::MachO::arm_thread_state64_t::lr
uint64_t lr
Definition: MachO.h:1823
llvm::MachO::x86_thread_state64_t::rcx
uint64_t rcx
Definition: MachO.h:1550
llvm::MachO::mach_header_64::sizeofcmds
uint32_t sizeofcmds
Definition: MachO.h:525
llvm::MachO::segment_command::flags
uint32_t flags
Definition: MachO.h:546
llvm::MachO::PPC_FLOAT_STATE
@ PPC_FLOAT_STATE
Definition: MachO.h:1984
llvm::MachO::x86_thread_state64_t::r13
uint64_t r13
Definition: MachO.h:1561
llvm::MachO::routines_command_64::reserved6
uint64_t reserved6
Definition: MachO.h:690
align
mov r0 ldr L5 sub r0 lr needed for prologue ldmia ip add bx lr r2 The last stmia stores r2 into the address passed in there is one additional stmia that stores and r2 to some stack location The store is dead The llvm gcc generated code looks like align
Definition: README.txt:236
llvm::MachO::nlist_64
Definition: MachO.h:995
llvm::MachO::x86_thread_state32_t::edx
uint32_t edx
Definition: MachO.h:1532
llvm::MachO::section::nreloc
uint32_t nreloc
Definition: MachO.h:571
llvm::MachO::CPU_SUBTYPE_486SX
@ CPU_SUBTYPE_486SX
Definition: MachO.h:1447
llvm::MachO::x86_float_state_t
Definition: MachO.h:1734
llvm::MachO::CPU_SUBTYPE_MULTIPLE
@ CPU_SUBTYPE_MULTIPLE
Definition: MachO.h:1439
llvm::MachO::CS_SuperBlob
Definition: MachO.h:2190
llvm::MachO::mach_header_64::cpusubtype
uint32_t cpusubtype
Definition: MachO.h:522
llvm::MachO::section::sectname
char sectname[16]
Definition: MachO.h:564
llvm::MachO::CS_CDHASH_LEN
@ CS_CDHASH_LEN
Definition: MachO.h:2135
llvm::MachO::CS_REQUIRE_LV
@ CS_REQUIRE_LV
Definition: MachO.h:2029
llvm::MachO::ARM64_RELOC_GOT_LOAD_PAGE21
@ ARM64_RELOC_GOT_LOAD_PAGE21
Definition: MachO.h:459
llvm::MachO::note_command::cmdsize
uint32_t cmdsize
Definition: MachO.h:844
llvm::MachO::ppc_thread_state32_t::r14
uint32_t r14
Definition: MachO.h:1896
llvm::MachO::ppc_thread_state32_t::r1
uint32_t r1
Definition: MachO.h:1883
llvm::MachO::ppc_thread_state_t
Definition: MachO.h:1970
llvm::MachO::ppc_thread_state32_t
Definition: MachO.h:1879
llvm::MachO::section_64::align
uint32_t align
Definition: MachO.h:583
llvm::MachO::CPUSubTypeARM64_32
CPUSubTypeARM64_32
Definition: MachO.h:1502
llvm::MachO::ARMThreadFlavors
ARMThreadFlavors
Definition: MachO.h:1857
llvm::MachO::S_LAZY_DYLIB_SYMBOL_POINTERS
@ S_LAZY_DYLIB_SYMBOL_POINTERS
S_LAZY_DYLIB_SYMBOL_POINTERS - Section with lazy symbol pointers to lazy loaded dylibs.
Definition: MachO.h:163
llvm::MachO::CS_RUNTIME
@ CS_RUNTIME
Definition: MachO.h:2036
llvm::MachO::PPC_RELOC_LO14_SECTDIFF
@ PPC_RELOC_LO14_SECTDIFF
Definition: MachO.h:427
llvm::MachO::SG_HIGHVM
@ SG_HIGHVM
Definition: MachO.h:105
llvm::MachO::source_version_command::cmd
uint32_t cmd
Definition: MachO.h:812
llvm::MachO::nlist_64::n_desc
uint16_t n_desc
Definition: MachO.h:999
llvm::MachO::dylib_module_64::iinit_iterm
uint32_t iinit_iterm
Definition: MachO.h:756
llvm::MachO::linker_option_command::count
uint32_t count
Definition: MachO.h:883
llvm::MachO::x86_float_state64_t::fpu_xmm12
xmm_reg_t fpu_xmm12
Definition: MachO.h:1639
llvm::MachO::SectionOrdinal
SectionOrdinal
Definition: MachO.h:317
llvm::MachO::PLATFORM_DRIVERKIT
@ PLATFORM_DRIVERKIT
Definition: MachO.h:501
llvm::MachO::sub_framework_command::umbrella
uint32_t umbrella
Definition: MachO.h:626
llvm::MachO::PPC_THREAD_STATE64
@ PPC_THREAD_STATE64
Definition: MachO.h:1987