Rizin
unix-like reverse engineering framework and cli tools
mach0_defines.h File Reference
#include <stdint.h>

Go to the source code of this file.

Classes

struct  mach_header
 
struct  mach_header_64
 
struct  load_command
 
struct  segment_command
 
struct  segment_command_64
 
struct  section
 
struct  section_64
 
struct  fvmlib
 
struct  fvmlib_command
 
struct  dylib
 
struct  dylib_command
 
struct  sub_framework_command
 
struct  sub_client_command
 
struct  sub_umbrella_command
 
struct  sub_library_command
 
struct  prebound_dylib_command
 
struct  dylinker_command
 
struct  thread_command
 
struct  routines_command
 
struct  routines_command_64
 
struct  symtab_command
 
struct  dysymtab_command
 
struct  dylib_table_of_contents
 
struct  dylib_module
 
struct  dylib_module_64
 
struct  dylib_reference
 
struct  twolevel_hints_command
 
struct  twolevel_hint
 
struct  prebind_cksum_command
 
struct  uuid_command
 
struct  rpath_command
 
struct  linkedit_data_command
 
struct  data_in_code_entry
 
struct  source_version_command
 
struct  encryption_info_command
 
struct  encryption_info_command_64
 
struct  version_min_command
 
struct  dyld_info_command
 
struct  linker_option_command
 
struct  symseg_command
 
struct  ident_command
 
struct  fvmfile_command
 
struct  tlv_descriptor_32
 
struct  tlv_descriptor_64
 
struct  tlv_descriptor
 
struct  entry_point_command
 
struct  fat_header
 
struct  fat_arch
 
struct  relocation_info
 
struct  scattered_relocation_info
 
struct  any_relocation_info
 
struct  nlist_base
 
struct  nlist
 
struct  nlist_64
 
struct  x86_thread_state64_t
 
struct  fp_control_t
 
struct  fp_status_t
 
struct  mmst_reg_t
 
struct  xmm_reg_t
 
struct  x86_float_state64_t
 
struct  x86_exception_state64_t
 
struct  x86_state_hdr_t
 
struct  x86_thread_state_t
 
struct  x86_float_state_t
 
struct  x86_exception_state_t
 
struct  dyld_chained_fixups_header
 
struct  dyld_chained_starts_in_image
 
struct  dyld_chained_starts_in_segment
 
struct  rz_dyld_chained_starts_in_segment
 
struct  dyld_chained_ptr_arm64e_rebase
 
struct  dyld_chained_ptr_arm64e_bind
 
struct  dyld_chained_ptr_arm64e_auth_rebase
 
struct  dyld_chained_ptr_arm64e_auth_bind
 
struct  dyld_chained_ptr_64_rebase
 
struct  dyld_chained_ptr_64_bind
 
struct  dyld_chained_ptr_arm64e_cache_rebase
 
struct  dyld_chained_ptr_arm64e_cache_auth_rebase
 
struct  dyld_chained_ptr_arm64e_bind24
 
struct  dyld_chained_ptr_arm64e_auth_bind24
 

Macros

#define x86_THREAD_STATE64_COUNT    sizeof(struct x86_thread_state64_t) / sizeof(uint32_t);
 
#define x86_FLOAT_STATE64_COUNT    sizeof(struct x86_float_state64_t) / sizeof(uint32_t);
 
#define x86_EXCEPTION_STATE64_COUNT    sizeof(struct x86_exception_state64_t) / sizeof(uint32_t);
 
#define x86_THREAD_STATE_COUNT    sizeof(struct x86_thread_state_t) / sizeof(uint32_t);
 
#define x86_FLOAT_STATE_COUNT    sizeof(struct x86_float_state_t) / sizeof(uint32_t);
 
#define x86_EXCEPTION_STATE_COUNT    sizeof(struct x86_exception_state_t) / sizeof(uint32_t);
 
#define EXPORT_SYMBOL_FLAGS_KIND_MASK   0x03
 
#define EXPORT_SYMBOL_FLAGS_KIND_REGULAR   0x00
 
#define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL   0x01
 
#define EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE   0x02
 
#define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION   0x04
 
#define EXPORT_SYMBOL_FLAGS_REEXPORT   0x08
 
#define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER   0x10
 

Enumerations

enum  {
  MH_MAGIC = 0xFEEDFACEu , MH_CIGAM = 0xCEFAEDFEu , MH_MAGIC_64 = 0xFEEDFACFu , MH_CIGAM_64 = 0xCFFAEDFEu ,
  FAT_MAGIC = 0xCAFEBABEu , FAT_CIGAM = 0xBEBAFECAu
}
 
enum  HeaderFileType {
  MH_OBJECT = 0x1u , MH_EXECUTE = 0x2u , MH_FVMLIB = 0x3u , MH_CORE = 0x4u ,
  MH_PRELOAD = 0x5u , MH_DYLIB = 0x6u , MH_DYLINKER = 0x7u , MH_BUNDLE = 0x8u ,
  MH_DYLIB_STUB = 0x9u , MH_DSYM = 0xAu , MH_KEXT_BUNDLE = 0xBu , MH_FILESET = 0xCu
}
 
enum  {
  MH_NOUNDEFS = 0x00000001u , MH_INCRLINK = 0x00000002u , MH_DYLDLINK = 0x00000004u , MH_BINDATLOAD = 0x00000008u ,
  MH_PREBOUND = 0x00000010u , MH_SPLIT_SEGS = 0x00000020u , MH_LAZY_INIT = 0x00000040u , MH_TWOLEVEL = 0x00000080u ,
  MH_FORCE_FLAT = 0x00000100u , MH_NOMULTIDEFS = 0x00000200u , MH_NOFIXPREBINDING = 0x00000400u , MH_PREBINDABLE = 0x00000800u ,
  MH_ALLMODSBOUND = 0x00001000u , MH_SUBSECTIONS_VIA_SYMBOLS = 0x00002000u , MH_CANONICAL = 0x00004000u , MH_WEAK_DEFINES = 0x00008000u ,
  MH_BINDS_TO_WEAK = 0x00010000u , MH_ALLOW_STACK_EXECUTION = 0x00020000u , MH_ROOT_SAFE = 0x00040000u , MH_SETUID_SAFE = 0x00080000u ,
  MH_NO_REEXPORTED_DYLIBS = 0x00100000u , MH_PIE = 0x00200000u , MH_DEAD_STRIPPABLE_DYLIB = 0x00400000u , MH_HAS_TLV_DESCRIPTORS = 0x00800000u ,
  MH_NO_HEAP_EXECUTION = 0x01000000u , MH_APP_EXTENSION_SAFE = 0x02000000u
}
 
enum  { LC_REQ_DYLD = 0x80000000u }
 
enum  LoadCommandType {
  LC_SEGMENT = 0x00000001u , LC_SYMTAB = 0x00000002u , LC_SYMSEG = 0x00000003u , LC_THREAD = 0x00000004u ,
  LC_UNIXTHREAD = 0x00000005u , LC_LOADFVMLIB = 0x00000006u , LC_IDFVMLIB = 0x00000007u , LC_IDENT = 0x00000008u ,
  LC_FVMFILE = 0x00000009u , LC_PREPAGE = 0x0000000Au , LC_DYSYMTAB = 0x0000000Bu , LC_LOAD_DYLIB = 0x0000000Cu ,
  LC_ID_DYLIB = 0x0000000Du , LC_LOAD_DYLINKER = 0x0000000Eu , LC_ID_DYLINKER = 0x0000000Fu , LC_PREBOUND_DYLIB = 0x00000010u ,
  LC_ROUTINES = 0x00000011u , LC_SUB_FRAMEWORK = 0x00000012u , LC_SUB_UMBRELLA = 0x00000013u , LC_SUB_CLIENT = 0x00000014u ,
  LC_SUB_LIBRARY = 0x00000015u , LC_TWOLEVEL_HINTS = 0x00000016u , LC_PREBIND_CKSUM = 0x00000017u , LC_LOAD_WEAK_DYLIB = 0x80000018u ,
  LC_SEGMENT_64 = 0x00000019u , LC_ROUTINES_64 = 0x0000001Au , LC_UUID = 0x0000001Bu , LC_RPATH = 0x8000001Cu ,
  LC_CODE_SIGNATURE = 0x0000001Du , LC_SEGMENT_SPLIT_INFO = 0x0000001Eu , LC_REEXPORT_DYLIB = 0x8000001Fu , LC_LAZY_LOAD_DYLIB = 0x00000020u ,
  LC_ENCRYPTION_INFO = 0x00000021u , LC_DYLD_INFO = 0x00000022u , LC_DYLD_INFO_ONLY = 0x80000022u , LC_LOAD_UPWARD_DYLIB = 0x80000023u ,
  LC_VERSION_MIN_MACOSX = 0x00000024u , LC_VERSION_MIN_IPHONEOS = 0x00000025u , LC_FUNCTION_STARTS = 0x00000026u , LC_DYLD_ENVIRONMENT = 0x00000027u ,
  LC_MAIN = 0x80000028u , LC_DATA_IN_CODE = 0x00000029u , LC_SOURCE_VERSION = 0x0000002Au , LC_DYLIB_CODE_SIGN_DRS = 0x0000002Bu ,
  LC_ENCRYPTION_INFO_64 = 0x0000002Cu , LC_LINKER_OPTION = 0x0000002Du , LC_LINKER_OPTIMIZATION_HINT = 0x0000002Eu , LC_VERSION_MIN_TVOS = 0x0000002Fu ,
  LC_VERSION_MIN_WATCHOS = 0x00000030u , LC_NOTE = 0x00000031u , LC_BUILD_VERSION = 0x00000032u , LC_DYLD_EXPORTS_TRIE = 0x80000033u ,
  LC_DYLD_CHAINED_FIXUPS = 0x80000034u , LC_KEXT = 0x80000035u
}
 
enum  {
  SG_HIGHVM = 0x1u , SG_FVMLIB = 0x2u , SG_NORELOC = 0x4u , SG_PROTECTED_VERSION_1 = 0x8u ,
  SECTION_TYPE = 0x000000ffu , SECTION_ATTRIBUTES = 0xffffff00u , SECTION_ATTRIBUTES_USR = 0xff000000u , SECTION_ATTRIBUTES_SYS = 0x00ffff00u
}
 
enum  SectionType {
  S_REGULAR = 0x00u , S_ZEROFILL = 0x01u , S_CSTRING_LITERALS = 0x02u , S_4BYTE_LITERALS = 0x03u ,
  S_8BYTE_LITERALS = 0x04u , S_LITERAL_POINTERS = 0x05u , S_NON_LAZY_SYMBOL_POINTERS = 0x06u , S_LAZY_SYMBOL_POINTERS = 0x07u ,
  S_SYMBOL_STUBS = 0x08u , S_MOD_INIT_FUNC_POINTERS = 0x09u , S_MOD_TERM_FUNC_POINTERS = 0x0au , S_COALESCED = 0x0bu ,
  S_GB_ZEROFILL = 0x0cu , S_INTERPOSING = 0x0du , S_16BYTE_LITERALS = 0x0eu , S_DTRACE_DOF = 0x0fu ,
  S_LAZY_DYLIB_SYMBOL_POINTERS = 0x10u , S_THREAD_LOCAL_REGULAR = 0x11u , S_THREAD_LOCAL_ZEROFILL = 0x12u , S_THREAD_LOCAL_VARIABLES = 0x13u ,
  S_THREAD_LOCAL_VARIABLE_POINTERS = 0x14u , S_THREAD_LOCAL_INIT_FUNCTION_POINTERS = 0x15u , LAST_KNOWN_SECTION_TYPE = S_THREAD_LOCAL_INIT_FUNCTION_POINTERS
}
 
enum  {
  S_ATTR_PURE_INSTRUCTIONS = 0x80000000u , S_ATTR_NO_TOC = 0x40000000u , S_ATTR_STRIP_STATIC_SYMS = 0x20000000u , S_ATTR_NO_DEAD_STRIP = 0x10000000u ,
  S_ATTR_LIVE_SUPPORT = 0x08000000u , S_ATTR_SELF_MODIFYING_CODE = 0x04000000u , S_ATTR_DEBUG = 0x02000000u , S_ATTR_SOME_INSTRUCTIONS = 0x00000400u ,
  S_ATTR_EXT_RELOC = 0x00000200u , S_ATTR_LOC_RELOC = 0x00000100u , INDIRECT_SYMBOL_LOCAL = 0x80000000u , INDIRECT_SYMBOL_ABS = 0x40000000u
}
 
enum  DataRegionType {
  DICE_KIND_DATA = 1u , DICE_KIND_JUMP_TABLE8 = 2u , DICE_KIND_JUMP_TABLE16 = 3u , DICE_KIND_JUMP_TABLE32 = 4u ,
  DICE_KIND_ABS_JUMP_TABLE32 = 5u
}
 
enum  RebaseType { REBASE_TYPE_POINTER = 1u , REBASE_TYPE_TEXT_ABSOLUTE32 = 2u , REBASE_TYPE_TEXT_PCREL32 = 3u }
 
enum  { REBASE_OPCODE_MASK = 0xF0u , REBASE_IMMEDIATE_MASK = 0x0Fu }
 
enum  RebaseOpcode {
  REBASE_OPCODE_DONE = 0x00u , REBASE_OPCODE_SET_TYPE_IMM = 0x10u , REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB = 0x20u , REBASE_OPCODE_ADD_ADDR_ULEB = 0x30u ,
  REBASE_OPCODE_ADD_ADDR_IMM_SCALED = 0x40u , REBASE_OPCODE_DO_REBASE_IMM_TIMES = 0x50u , REBASE_OPCODE_DO_REBASE_ULEB_TIMES = 0x60u , REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB = 0x70u ,
  REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB = 0x80u
}
 
enum  BindType { BIND_TYPE_POINTER = 1u , BIND_TYPE_TEXT_ABSOLUTE32 = 2u , BIND_TYPE_TEXT_PCREL32 = 3u }
 
enum  BindSpecialDylib { BIND_SPECIAL_DYLIB_SELF = 0 , BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE = -1 , BIND_SPECIAL_DYLIB_FLAT_LOOKUP = -2 }
 
enum  { BIND_SYMBOL_FLAGS_WEAK_IMPORT = 0x1u , BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION = 0x8u , BIND_OPCODE_MASK = 0xF0u , BIND_IMMEDIATE_MASK = 0x0Fu }
 
enum  BindOpcode {
  BIND_OPCODE_DONE = 0x00u , BIND_OPCODE_SET_DYLIB_ORDINAL_IMM = 0x10u , BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB = 0x20u , BIND_OPCODE_SET_DYLIB_SPECIAL_IMM = 0x30u ,
  BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM = 0x40u , BIND_OPCODE_SET_TYPE_IMM = 0x50u , BIND_OPCODE_SET_ADDEND_SLEB = 0x60u , BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB = 0x70u ,
  BIND_OPCODE_ADD_ADDR_ULEB = 0x80u , BIND_OPCODE_DO_BIND = 0x90u , BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB = 0xA0u , BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED = 0xB0u ,
  BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB = 0xC0u , BIND_OPCODE_THREADED = 0xD0u
}
 
enum  BindSubOpcode { BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB = 0x00 , BIND_SUBOPCODE_THREADED_APPLY = 0x01 }
 
enum  { EXPORT_SYMBOL_FLAGS_KIND_MASK = 0x03u , EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION = 0x04u , EXPORT_SYMBOL_FLAGS_REEXPORT = 0x08u , EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER = 0x10u }
 
enum  ExportSymbolKind { EXPORT_SYMBOL_FLAGS_KIND_REGULAR = 0x00u , EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL = 0x01u , EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE = 0x02u }
 
enum  { N_STAB = 0xe0 , N_PEXT = 0x10 , N_TYPE = 0x0e , N_EXT = 0x01 }
 
enum  NListType {
  N_UNDF = 0x0u , N_ABS = 0x2u , N_SECT = 0xeu , N_PBUD = 0xcu ,
  N_INDR = 0xau
}
 
enum  SectionOrdinal { NO_SECT = 0u , MAX_SECT = 0xffu }
 
enum  {
  REFERENCE_TYPE = 0x7 , REFERENCE_FLAG_UNDEFINED_NON_LAZY = 0 , REFERENCE_FLAG_UNDEFINED_LAZY = 1 , REFERENCE_FLAG_DEFINED = 2 ,
  REFERENCE_FLAG_PRIVATE_DEFINED = 3 , REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY = 4 , REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY = 5 , N_ARM_THUMB_DEF = 0x0008u ,
  REFERENCED_DYNAMICALLY = 0x0010u , N_NO_DEAD_STRIP = 0x0020u , N_WEAK_REF = 0x0040u , N_WEAK_DEF = 0x0080u ,
  N_SYMBOL_RESOLVER = 0x0100u , N_ALT_ENTRY = 0x0200u , SELF_LIBRARY_ORDINAL = 0x0 , MAX_LIBRARY_ORDINAL = 0xfd ,
  DYNAMIC_LOOKUP_ORDINAL = 0xfe , EXECUTABLE_ORDINAL = 0xff
}
 
enum  StabType {
  N_GSYM = 0x20u , N_FNAME = 0x22u , N_FUN = 0x24u , N_STSYM = 0x26u ,
  N_LCSYM = 0x28u , N_BNSYM = 0x2Eu , N_PC = 0x30u , N_AST = 0x32u ,
  N_OPT = 0x3Cu , N_RSYM = 0x40u , N_SLINE = 0x44u , N_ENSYM = 0x4Eu ,
  N_SSYM = 0x60u , N_SO = 0x64u , N_OSO = 0x66u , N_LSYM = 0x80u ,
  N_BINCL = 0x82u , N_SOL = 0x84u , N_PARAMS = 0x86u , N_VERSION = 0x88u ,
  N_OLEVEL = 0x8Au , N_PSYM = 0xA0u , N_EINCL = 0xA2u , N_ENTRY = 0xA4u ,
  N_LBRAC = 0xC0u , N_EXCL = 0xC2u , N_RBRAC = 0xE0u , N_BCOMM = 0xE2u ,
  N_ECOMM = 0xE4u , N_ECOML = 0xE8u , N_LENG = 0xFEu
}
 
enum  { RZ_ABS = 0 , RZ_SCATTERED = 0x80000000 }
 
enum  RelocationInfoType {
  GENERIC_RELOC_VANILLA = 0 , GENERIC_RELOC_PAIR = 1 , GENERIC_RELOC_SECTDIFF = 2 , GENERIC_RELOC_PB_LA_PTR = 3 ,
  GENERIC_RELOC_LOCAL_SECTDIFF = 4 , GENERIC_RELOC_TLV = 5 , PPC_RELOC_VANILLA = GENERIC_RELOC_VANILLA , PPC_RELOC_PAIR = GENERIC_RELOC_PAIR ,
  PPC_RELOC_BR14 = 2 , PPC_RELOC_BR24 = 3 , PPC_RELOC_HI16 = 4 , PPC_RELOC_LO16 = 5 ,
  PPC_RELOC_HA16 = 6 , PPC_RELOC_LO14 = 7 , PPC_RELOC_SECTDIFF = 8 , PPC_RELOC_PB_LA_PTR = 9 ,
  PPC_RELOC_HI16_SECTDIFF = 10 , PPC_RELOC_LO16_SECTDIFF = 11 , PPC_RELOC_HA16_SECTDIFF = 12 , PPC_RELOC_JBSR = 13 ,
  PPC_RELOC_LO14_SECTDIFF = 14 , PPC_RELOC_LOCAL_SECTDIFF = 15 , ARM_RELOC_VANILLA = GENERIC_RELOC_VANILLA , ARM_RELOC_PAIR = GENERIC_RELOC_PAIR ,
  ARM_RELOC_SECTDIFF = GENERIC_RELOC_SECTDIFF , ARM_RELOC_LOCAL_SECTDIFF = 3 , ARM_RELOC_PB_LA_PTR = 4 , ARM_RELOC_BR24 = 5 ,
  ARM_THUMB_RELOC_BR22 = 6 , ARM_THUMB_32BIT_BRANCH = 7 , ARM_RELOC_HALF = 8 , ARM_RELOC_HALF_SECTDIFF = 9 ,
  ARM64_RELOC_UNSIGNED = 0 , ARM64_RELOC_SUBTRACTOR = 1 , ARM64_RELOC_BRANCH26 = 2 , ARM64_RELOC_PAGE21 = 3 ,
  ARM64_RELOC_PAGEOFF12 = 4 , ARM64_RELOC_GOT_LOAD_PAGE21 = 5 , ARM64_RELOC_GOT_LOAD_PAGEOFF12 = 6 , ARM64_RELOC_POINTER_TO_GOT = 7 ,
  ARM64_RELOC_TLVP_LOAD_PAGE21 = 8 , ARM64_RELOC_TLVP_LOAD_PAGEOFF12 = 9 , ARM64_RELOC_ADDEND = 10 , X86_64_RELOC_UNSIGNED = 0 ,
  X86_64_RELOC_SIGNED = 1 , X86_64_RELOC_BRANCH = 2 , X86_64_RELOC_GOT_LOAD = 3 , X86_64_RELOC_GOT = 4 ,
  X86_64_RELOC_SUBTRACTOR = 5 , X86_64_RELOC_SIGNED_1 = 6 , X86_64_RELOC_SIGNED_2 = 7 , X86_64_RELOC_SIGNED_4 = 8 ,
  X86_64_RELOC_TLV = 9
}
 
enum  { VM_PROT_READ = 0x1 , VM_PROT_WRITE = 0x2 , VM_PROT_EXECUTE = 0x4 }
 
enum  { CPU_ARCH_MASK = 0xff000000 , CPU_ARCH_ABI64 = 0x01000000 , CPU_ARCH_ABI32 = 0x02000000 }
 
enum  CPUType {
  CPU_TYPE_ANY = -1 , CPU_TYPE_VAX = 1 , CPU_TYPE_MC680x0 = 6 , CPU_TYPE_X86 = 7 ,
  CPU_TYPE_I386 = CPU_TYPE_X86 , CPU_TYPE_X86_64 = CPU_TYPE_X86 | CPU_ARCH_ABI64 , CPU_TYPE_MIPS = 8 , CPU_TYPE_MC98000 = 10 ,
  CPU_TYPE_HPPA = 11 , CPU_TYPE_ARM = 12 , CPU_TYPE_ARM64 = CPU_TYPE_ARM | CPU_ARCH_ABI64 , CPU_TYPE_ARM64_32 = CPU_TYPE_ARM | CPU_ARCH_ABI32 ,
  CPU_TYPE_MC88000 = 13 , CPU_TYPE_SPARC = 14 , CPU_TYPE_I860 = 15 , CPU_TYPE_POWERPC = 18 ,
  CPU_TYPE_POWERPC64 = CPU_TYPE_POWERPC | CPU_ARCH_ABI64
}
 
enum  { CPU_SUBTYPE_MASK = 0xff000000 , CPU_SUBTYPE_LIB64 = 0x80000000 , CPU_SUBTYPE_MULTIPLE = ~0u }
 
enum  CPUSubTypeX86 {
  CPU_SUBTYPE_I386_ALL = 3 , CPU_SUBTYPE_386 = 3 , CPU_SUBTYPE_486 = 4 , CPU_SUBTYPE_486SX = 0x84 ,
  CPU_SUBTYPE_586 = 5 , CPU_SUBTYPE_PENT = CPU_SUBTYPE_586 , CPU_SUBTYPE_PENTPRO = 0x16 , CPU_SUBTYPE_PENTII_M3 = 0x36 ,
  CPU_SUBTYPE_PENTII_M5 = 0x56 , CPU_SUBTYPE_CELERON = 0x67 , CPU_SUBTYPE_CELERON_MOBILE = 0x77 , CPU_SUBTYPE_PENTIUM_3 = 0x08 ,
  CPU_SUBTYPE_PENTIUM_3_M = 0x18 , CPU_SUBTYPE_PENTIUM_3_XEON = 0x28 , CPU_SUBTYPE_PENTIUM_M = 0x09 , CPU_SUBTYPE_PENTIUM_4 = 0x0a ,
  CPU_SUBTYPE_PENTIUM_4_M = 0x1a , CPU_SUBTYPE_ITANIUM = 0x0b , CPU_SUBTYPE_ITANIUM_2 = 0x1b , CPU_SUBTYPE_XEON = 0x0c ,
  CPU_SUBTYPE_XEON_MP = 0x1c , CPU_SUBTYPE_X86_ALL = 3 , CPU_SUBTYPE_X86_64_ALL = 3 , CPU_SUBTYPE_X86_ARCH1 = 4 ,
  CPU_SUBTYPE_X86_64_H = 8
}
 
enum  { CPU_SUBTYPE_INTEL_FAMILY_MAX = 15 , CPU_SUBTYPE_INTEL_MODEL_ALL = 0 }
 
enum  CPUSubTypeARM {
  CPU_SUBTYPE_ARM_ALL = 0 , CPU_SUBTYPE_ARM_V4T = 5 , CPU_SUBTYPE_ARM_V6 = 6 , CPU_SUBTYPE_ARM_V5 = 7 ,
  CPU_SUBTYPE_ARM_V5TEJ = 7 , CPU_SUBTYPE_ARM_XSCALE = 8 , CPU_SUBTYPE_ARM_V7 = 9 , CPU_SUBTYPE_ARM_V7F = 10 ,
  CPU_SUBTYPE_ARM_V7S = 11 , CPU_SUBTYPE_ARM_V7K = 12 , CPU_SUBTYPE_ARM_V6M = 14 , CPU_SUBTYPE_ARM_V7M = 15 ,
  CPU_SUBTYPE_ARM_V7EM = 16
}
 
enum  CPUSubTypeARM64 { CPU_SUBTYPE_ARM64_ALL = 0 , CPU_SUBTYPE_ARM64_V8 = 1 , CPU_SUBTYPE_ARM64E = 2 }
 
enum  CPUSubTypeSPARC { CPU_SUBTYPE_SPARC_ALL = 0 }
 
enum  CPUSubTypePowerPC {
  CPU_SUBTYPE_POWERPC_ALL = 0 , CPU_SUBTYPE_POWERPC_601 = 1 , CPU_SUBTYPE_POWERPC_602 = 2 , CPU_SUBTYPE_POWERPC_603 = 3 ,
  CPU_SUBTYPE_POWERPC_603e = 4 , CPU_SUBTYPE_POWERPC_603ev = 5 , CPU_SUBTYPE_POWERPC_604 = 6 , CPU_SUBTYPE_POWERPC_604e = 7 ,
  CPU_SUBTYPE_POWERPC_620 = 8 , CPU_SUBTYPE_POWERPC_750 = 9 , CPU_SUBTYPE_POWERPC_7400 = 10 , CPU_SUBTYPE_POWERPC_7450 = 11 ,
  CPU_SUBTYPE_POWERPC_970 = 100 , CPU_SUBTYPE_MC98000_ALL = CPU_SUBTYPE_POWERPC_ALL , CPU_SUBTYPE_MC98601 = CPU_SUBTYPE_POWERPC_601
}
 
enum  CPUSubTypeVAX {
  CPU_SUBTYPE_VAX_ALL = 0 , CPU_SUBTYPE_VAX780 = 1 , CPU_SUBTYPE_VAX785 = 2 , CPU_SUBTYPE_VAX750 = 3 ,
  CPU_SUBTYPE_VAX730 = 4 , CPU_SUBTYPE_UVAXI = 5 , CPU_SUBTYPE_UVAXII = 6 , CPU_SUBTYPE_VAX8200 = 7 ,
  CPU_SUBTYPE_VAX8500 = 8 , CPU_SUBTYPE_VAX8600 = 9 , CPU_SUBTYPE_VAX8650 = 10 , CPU_SUBTYPE_VAX8800 = 11 ,
  CPU_SUBTYPE_UVAXIII = 12
}
 
enum  CPUSubTypeMIPS {
  CPU_SUBTYPE_MIPS_ALL = 0 , CPU_SUBTYPE_MIPS_R2300 = 1 , CPU_SUBTYPE_MIPS_R2600 = 2 , CPU_SUBTYPE_MIPS_R2800 = 3 ,
  CPU_SUBTYPE_MIPS_R2000a = 4 , CPU_SUBTYPE_MIPS_R2000 = 5 , CPU_SUBTYPE_MIPS_R3000a = 6 , CPU_SUBTYPE_MIPS_R3000 = 7
}
 
enum  CPUSubTypeMC680x0 { CPU_SUBTYPE_MC680x0_ALL = 1 , CPU_SUBTYPE_MC68030 = 1 , CPU_SUBTYPE_MC68040 = 2 , CPU_SUBTYPE_MC68030_ONLY = 3 }
 
enum  CPUSubTypeMC88000 { CPU_SUBTYPE_MC88000_ALL = 0 , CPU_SUBTYPE_MC88100 = 1 , CPU_SUBTYPE_MC88110 = 2 }
 
enum  CPUSubTypeHPPA { CPU_SUBTYPE_HPPA_ALL = 0 , CPU_SUBTYPE_HPPA_7100 = 0 , CPU_SUBTYPE_HPPA_7100LC = 1 }
 
enum  CPUSubTypeI860 { CPU_SUBTYPE_I860_ALL = 0 , CPU_SUBTYPE_I860_860 = 1 }
 
enum  x86_fp_control_precis { x86_FP_PREC_24B = 0 , x86_FP_PREC_53B = 2 , x86_FP_PREC_64B = 3 }
 
enum  x86_fp_control_rc { x86_FP_RND_NEAR = 0 , x86_FP_RND_DOWN = 1 , x86_FP_RND_UP = 2 , x86_FP_CHOP = 3 }
 
enum  X86ThreadFlavors {
  x86_THREAD_STATE32 = 1 , x86_FLOAT_STATE32 = 2 , x86_EXCEPTION_STATE32 = 3 , x86_THREAD_STATE64 = 4 ,
  x86_FLOAT_STATE64 = 5 , x86_EXCEPTION_STATE64 = 6 , x86_THREAD_STATE = 7 , x86_FLOAT_STATE = 8 ,
  x86_EXCEPTION_STATE = 9 , x86_DEBUG_STATE32 = 10 , x86_DEBUG_STATE64 = 11 , x86_DEBUG_STATE = 12
}
 
enum  { DYLD_CHAINED_PTR_START_NONE = 0xFFFF , DYLD_CHAINED_PTR_START_MULTI = 0x8000 , DYLD_CHAINED_PTR_START_LAST = 0x8000 }
 
enum  {
  DYLD_CHAINED_PTR_ARM64E = 1 , DYLD_CHAINED_PTR_64 = 2 , DYLD_CHAINED_PTR_32 = 3 , DYLD_CHAINED_PTR_32_CACHE = 4 ,
  DYLD_CHAINED_PTR_32_FIRMWARE = 5 , DYLD_CHAINED_PTR_64_OFFSET = 6 , DYLD_CHAINED_PTR_ARM64E_KERNEL = 7 , DYLD_CHAINED_PTR_64_KERNEL_CACHE = 8 ,
  DYLD_CHAINED_PTR_ARM64E_USERLAND24 = 12
}
 

Functions

static uint16_t GET_LIBRARY_ORDINAL (uint16_t n_desc)
 
static void SET_LIBRARY_ORDINAL (uint16_t *n_desc, uint8_t ordinal)
 
static uint8_t GET_COMM_ALIGN (uint16_t n_desc)
 
static void SET_COMM_ALIGN (uint16_t *n_desc, uint8_t align)
 
static int CPU_SUBTYPE_INTEL (int Family, int Model)
 
static int CPU_SUBTYPE_INTEL_FAMILY (enum CPUSubTypeX86 ST)
 
static int CPU_SUBTYPE_INTEL_MODEL (enum CPUSubTypeX86 ST)
 

Macro Definition Documentation

◆ EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE

#define EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE   0x02

Definition at line 1430 of file mach0_defines.h.

◆ EXPORT_SYMBOL_FLAGS_KIND_MASK

#define EXPORT_SYMBOL_FLAGS_KIND_MASK   0x03

Definition at line 1427 of file mach0_defines.h.

◆ EXPORT_SYMBOL_FLAGS_KIND_REGULAR

#define EXPORT_SYMBOL_FLAGS_KIND_REGULAR   0x00

Definition at line 1428 of file mach0_defines.h.

◆ EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL

#define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL   0x01

Definition at line 1429 of file mach0_defines.h.

◆ EXPORT_SYMBOL_FLAGS_REEXPORT

#define EXPORT_SYMBOL_FLAGS_REEXPORT   0x08

Definition at line 1432 of file mach0_defines.h.

◆ EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER

#define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER   0x10

Definition at line 1433 of file mach0_defines.h.

◆ EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION

#define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION   0x04

Definition at line 1431 of file mach0_defines.h.

◆ x86_EXCEPTION_STATE64_COUNT

#define x86_EXCEPTION_STATE64_COUNT    sizeof(struct x86_exception_state64_t) / sizeof(uint32_t);

Definition at line 1417 of file mach0_defines.h.

◆ x86_EXCEPTION_STATE_COUNT

#define x86_EXCEPTION_STATE_COUNT    sizeof(struct x86_exception_state_t) / sizeof(uint32_t);

Definition at line 1424 of file mach0_defines.h.

◆ x86_FLOAT_STATE64_COUNT

#define x86_FLOAT_STATE64_COUNT    sizeof(struct x86_float_state64_t) / sizeof(uint32_t);

Definition at line 1415 of file mach0_defines.h.

◆ x86_FLOAT_STATE_COUNT

#define x86_FLOAT_STATE_COUNT    sizeof(struct x86_float_state_t) / sizeof(uint32_t);

Definition at line 1422 of file mach0_defines.h.

◆ x86_THREAD_STATE64_COUNT

#define x86_THREAD_STATE64_COUNT    sizeof(struct x86_thread_state64_t) / sizeof(uint32_t);

Definition at line 1413 of file mach0_defines.h.

◆ x86_THREAD_STATE_COUNT

#define x86_THREAD_STATE_COUNT    sizeof(struct x86_thread_state_t) / sizeof(uint32_t);

Definition at line 1420 of file mach0_defines.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MH_MAGIC 
MH_CIGAM 
MH_MAGIC_64 
MH_CIGAM_64 
FAT_MAGIC 
FAT_CIGAM 

Definition at line 58 of file mach0_defines.h.

58  {
59  // Constants for the "magic" field in llvm::MachO::mach_header and
60  // llvm::MachO::mach_header_64
61  MH_MAGIC = 0xFEEDFACEu,
62  MH_CIGAM = 0xCEFAEDFEu,
63  MH_MAGIC_64 = 0xFEEDFACFu,
64  MH_CIGAM_64 = 0xCFFAEDFEu,
65  FAT_MAGIC = 0xCAFEBABEu,
66  FAT_CIGAM = 0xBEBAFECAu
67 };
@ MH_CIGAM
Definition: mach0_defines.h:62
@ MH_MAGIC_64
Definition: mach0_defines.h:63
@ FAT_CIGAM
Definition: mach0_defines.h:66
@ FAT_MAGIC
Definition: mach0_defines.h:65
@ MH_MAGIC
Definition: mach0_defines.h:61
@ MH_CIGAM_64
Definition: mach0_defines.h:64

◆ anonymous enum

anonymous enum
Enumerator
MH_NOUNDEFS 
MH_INCRLINK 
MH_DYLDLINK 
MH_BINDATLOAD 
MH_PREBOUND 
MH_SPLIT_SEGS 
MH_LAZY_INIT 
MH_TWOLEVEL 
MH_FORCE_FLAT 
MH_NOMULTIDEFS 
MH_NOFIXPREBINDING 
MH_PREBINDABLE 
MH_ALLMODSBOUND 
MH_SUBSECTIONS_VIA_SYMBOLS 
MH_CANONICAL 
MH_WEAK_DEFINES 
MH_BINDS_TO_WEAK 
MH_ALLOW_STACK_EXECUTION 
MH_ROOT_SAFE 
MH_SETUID_SAFE 
MH_NO_REEXPORTED_DYLIBS 
MH_PIE 
MH_DEAD_STRIPPABLE_DYLIB 
MH_HAS_TLV_DESCRIPTORS 
MH_NO_HEAP_EXECUTION 
MH_APP_EXTENSION_SAFE 

Definition at line 86 of file mach0_defines.h.

86  {
87  // Constant bits for the "flags" field in llvm::MachO::mach_header and
88  // llvm::MachO::mach_header_64
89  MH_NOUNDEFS = 0x00000001u,
90  MH_INCRLINK = 0x00000002u,
91  MH_DYLDLINK = 0x00000004u,
92  MH_BINDATLOAD = 0x00000008u,
93  MH_PREBOUND = 0x00000010u,
94  MH_SPLIT_SEGS = 0x00000020u,
95  MH_LAZY_INIT = 0x00000040u,
96  MH_TWOLEVEL = 0x00000080u,
97  MH_FORCE_FLAT = 0x00000100u,
98  MH_NOMULTIDEFS = 0x00000200u,
99  MH_NOFIXPREBINDING = 0x00000400u,
100  MH_PREBINDABLE = 0x00000800u,
101  MH_ALLMODSBOUND = 0x00001000u,
102  MH_SUBSECTIONS_VIA_SYMBOLS = 0x00002000u,
103  MH_CANONICAL = 0x00004000u,
104  MH_WEAK_DEFINES = 0x00008000u,
105  MH_BINDS_TO_WEAK = 0x00010000u,
106  MH_ALLOW_STACK_EXECUTION = 0x00020000u,
107  MH_ROOT_SAFE = 0x00040000u,
108  MH_SETUID_SAFE = 0x00080000u,
109  MH_NO_REEXPORTED_DYLIBS = 0x00100000u,
110  MH_PIE = 0x00200000u,
111  MH_DEAD_STRIPPABLE_DYLIB = 0x00400000u,
112  MH_HAS_TLV_DESCRIPTORS = 0x00800000u,
113  MH_NO_HEAP_EXECUTION = 0x01000000u,
114  MH_APP_EXTENSION_SAFE = 0x02000000u
115 };
@ MH_SETUID_SAFE
@ MH_PREBINDABLE
@ MH_FORCE_FLAT
Definition: mach0_defines.h:97
@ MH_ALLOW_STACK_EXECUTION
@ MH_WEAK_DEFINES
@ MH_NO_HEAP_EXECUTION
@ MH_NOUNDEFS
Definition: mach0_defines.h:89
@ MH_NOMULTIDEFS
Definition: mach0_defines.h:98
@ MH_DYLDLINK
Definition: mach0_defines.h:91
@ MH_CANONICAL
@ MH_PIE
@ MH_BINDS_TO_WEAK
@ MH_BINDATLOAD
Definition: mach0_defines.h:92
@ MH_APP_EXTENSION_SAFE
@ MH_SUBSECTIONS_VIA_SYMBOLS
@ MH_ALLMODSBOUND
@ MH_LAZY_INIT
Definition: mach0_defines.h:95
@ MH_TWOLEVEL
Definition: mach0_defines.h:96
@ MH_SPLIT_SEGS
Definition: mach0_defines.h:94
@ MH_INCRLINK
Definition: mach0_defines.h:90
@ MH_PREBOUND
Definition: mach0_defines.h:93
@ MH_NOFIXPREBINDING
Definition: mach0_defines.h:99
@ MH_NO_REEXPORTED_DYLIBS
@ MH_DEAD_STRIPPABLE_DYLIB
@ MH_HAS_TLV_DESCRIPTORS
@ MH_ROOT_SAFE

◆ anonymous enum

anonymous enum
Enumerator
LC_REQ_DYLD 

Definition at line 117 of file mach0_defines.h.

117  {
118  // Flags for the "cmd" field in llvm::MachO::load_command
119  LC_REQ_DYLD = 0x80000000u
120 };
@ LC_REQ_DYLD

◆ anonymous enum

anonymous enum
Enumerator
SG_HIGHVM 
SG_FVMLIB 
SG_NORELOC 
SG_PROTECTED_VERSION_1 
SECTION_TYPE 
SECTION_ATTRIBUTES 
SECTION_ATTRIBUTES_USR 
SECTION_ATTRIBUTES_SYS 

Definition at line 191 of file mach0_defines.h.

191  {
192  // Constant bits for the "flags" field in llvm::MachO::segment_command
193  SG_HIGHVM = 0x1u,
194  SG_FVMLIB = 0x2u,
195  SG_NORELOC = 0x4u,
196  SG_PROTECTED_VERSION_1 = 0x8u,
197 
198  // Constant masks for the "flags" field in llvm::MachO::section and
199  // llvm::MachO::section_64
200  SECTION_TYPE = 0x000000ffu, // SECTION_TYPE
201  SECTION_ATTRIBUTES = 0xffffff00u, // SECTION_ATTRIBUTES
202  SECTION_ATTRIBUTES_USR = 0xff000000u, // SECTION_ATTRIBUTES_USR
203  SECTION_ATTRIBUTES_SYS = 0x00ffff00u // SECTION_ATTRIBUTES_SYS
204 };
@ SG_HIGHVM
@ SG_PROTECTED_VERSION_1
@ SECTION_TYPE
@ SG_NORELOC
@ SECTION_ATTRIBUTES_SYS
@ SECTION_ATTRIBUTES_USR
@ SG_FVMLIB
@ SECTION_ATTRIBUTES

◆ anonymous enum

anonymous enum
Enumerator
S_ATTR_PURE_INSTRUCTIONS 

S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.

S_ATTR_NO_TOC 

S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be in a ranlib table of contents.

S_ATTR_STRIP_STATIC_SYMS 

S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section in files with the MY_DYLDLINK flag.

S_ATTR_NO_DEAD_STRIP 

S_ATTR_NO_DEAD_STRIP - No dead stripping.

S_ATTR_LIVE_SUPPORT 

S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.

S_ATTR_SELF_MODIFYING_CODE 

S_ATTR_SELF_MODIFYING_CODE - Used with i386 code stubs written on by dyld.

S_ATTR_DEBUG 

S_ATTR_DEBUG - A debug section.

S_ATTR_SOME_INSTRUCTIONS 

S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.

S_ATTR_EXT_RELOC 

S_ATTR_EXT_RELOC - Section has external relocation entries.

S_ATTR_LOC_RELOC 

S_ATTR_LOC_RELOC - Section has local relocation entries.

INDIRECT_SYMBOL_LOCAL 
INDIRECT_SYMBOL_ABS 

Definition at line 269 of file mach0_defines.h.

269  {
270  // Constant masks for the "flags[31:24]" field in llvm::MachO::section and
271  // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_USR)
272 
275  S_ATTR_PURE_INSTRUCTIONS = 0x80000000u,
278  S_ATTR_NO_TOC = 0x40000000u,
281  S_ATTR_STRIP_STATIC_SYMS = 0x20000000u,
283  S_ATTR_NO_DEAD_STRIP = 0x10000000u,
285  S_ATTR_LIVE_SUPPORT = 0x08000000u,
288  S_ATTR_SELF_MODIFYING_CODE = 0x04000000u,
290  S_ATTR_DEBUG = 0x02000000u,
291 
292  // Constant masks for the "flags[23:8]" field in llvm::MachO::section and
293  // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_SYS)
294 
296  S_ATTR_SOME_INSTRUCTIONS = 0x00000400u,
298  S_ATTR_EXT_RELOC = 0x00000200u,
300  S_ATTR_LOC_RELOC = 0x00000100u,
301 
302  // Constant masks for the value of an indirect symbol in an indirect
303  // symbol table
304  INDIRECT_SYMBOL_LOCAL = 0x80000000u,
305  INDIRECT_SYMBOL_ABS = 0x40000000u
306 };
@ S_ATTR_SOME_INSTRUCTIONS
S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.
@ S_ATTR_NO_TOC
@ S_ATTR_STRIP_STATIC_SYMS
@ S_ATTR_EXT_RELOC
S_ATTR_EXT_RELOC - Section has external relocation entries.
@ S_ATTR_DEBUG
S_ATTR_DEBUG - A debug section.
@ S_ATTR_LIVE_SUPPORT
S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.
@ S_ATTR_NO_DEAD_STRIP
S_ATTR_NO_DEAD_STRIP - No dead stripping.
@ S_ATTR_LOC_RELOC
S_ATTR_LOC_RELOC - Section has local relocation entries.
@ S_ATTR_PURE_INSTRUCTIONS
@ INDIRECT_SYMBOL_LOCAL
@ INDIRECT_SYMBOL_ABS
@ S_ATTR_SELF_MODIFYING_CODE

◆ anonymous enum

anonymous enum
Enumerator
REBASE_OPCODE_MASK 
REBASE_IMMEDIATE_MASK 

Definition at line 323 of file mach0_defines.h.

323  {
324  REBASE_OPCODE_MASK = 0xF0u,
325  REBASE_IMMEDIATE_MASK = 0x0Fu
326 };
@ REBASE_IMMEDIATE_MASK
@ REBASE_OPCODE_MASK

◆ anonymous enum

anonymous enum
Enumerator
BIND_SYMBOL_FLAGS_WEAK_IMPORT 
BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION 
BIND_OPCODE_MASK 
BIND_IMMEDIATE_MASK 

Definition at line 352 of file mach0_defines.h.

352  {
355 
356  BIND_OPCODE_MASK = 0xF0u,
357  BIND_IMMEDIATE_MASK = 0x0Fu
358 };
@ BIND_SYMBOL_FLAGS_WEAK_IMPORT
@ BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION
@ BIND_OPCODE_MASK
@ BIND_IMMEDIATE_MASK

◆ anonymous enum

anonymous enum
Enumerator
EXPORT_SYMBOL_FLAGS_KIND_MASK 
EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION 
EXPORT_SYMBOL_FLAGS_REEXPORT 
EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER 

Definition at line 382 of file mach0_defines.h.

382  {
387 };
#define EXPORT_SYMBOL_FLAGS_KIND_MASK
#define EXPORT_SYMBOL_FLAGS_REEXPORT
#define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER
#define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION

◆ anonymous enum

anonymous enum
Enumerator
N_STAB 
N_PEXT 
N_TYPE 
N_EXT 

Definition at line 395 of file mach0_defines.h.

395  {
396  // Constant masks for the "n_type" field in llvm::MachO::nlist and
397  // llvm::MachO::nlist_64
398  N_STAB = 0xe0,
399  N_PEXT = 0x10,
400  N_TYPE = 0x0e,
401  N_EXT = 0x01
402 };
@ N_STAB
@ N_PEXT
@ N_EXT
@ N_TYPE

◆ anonymous enum

anonymous enum
Enumerator
REFERENCE_TYPE 
REFERENCE_FLAG_UNDEFINED_NON_LAZY 
REFERENCE_FLAG_UNDEFINED_LAZY 
REFERENCE_FLAG_DEFINED 
REFERENCE_FLAG_PRIVATE_DEFINED 
REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY 
REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY 
N_ARM_THUMB_DEF 
REFERENCED_DYNAMICALLY 
N_NO_DEAD_STRIP 
N_WEAK_REF 
N_WEAK_DEF 
N_SYMBOL_RESOLVER 
N_ALT_ENTRY 
SELF_LIBRARY_ORDINAL 
MAX_LIBRARY_ORDINAL 
DYNAMIC_LOOKUP_ORDINAL 
EXECUTABLE_ORDINAL 

Definition at line 421 of file mach0_defines.h.

421  {
422  // Constant masks for the "n_desc" field in llvm::MachO::nlist and
423  // llvm::MachO::nlist_64
424  // The low 3 bits are the for the REFERENCE_TYPE.
425  REFERENCE_TYPE = 0x7,
432  // Flag bits (some overlap with the library ordinal bits).
433  N_ARM_THUMB_DEF = 0x0008u,
434  REFERENCED_DYNAMICALLY = 0x0010u,
435  N_NO_DEAD_STRIP = 0x0020u,
436  N_WEAK_REF = 0x0040u,
437  N_WEAK_DEF = 0x0080u,
438  N_SYMBOL_RESOLVER = 0x0100u,
439  N_ALT_ENTRY = 0x0200u,
440  // For undefined symbols coming from libraries, see GET_LIBRARY_ORDINAL()
441  // as these are in the top 8 bits.
442  SELF_LIBRARY_ORDINAL = 0x0,
443  MAX_LIBRARY_ORDINAL = 0xfd,
444  DYNAMIC_LOOKUP_ORDINAL = 0xfe,
445  EXECUTABLE_ORDINAL = 0xff
446 };
@ N_WEAK_DEF
@ REFERENCE_FLAG_PRIVATE_DEFINED
@ REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY
@ DYNAMIC_LOOKUP_ORDINAL
@ N_ALT_ENTRY
@ REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY
@ N_NO_DEAD_STRIP
@ N_WEAK_REF
@ N_ARM_THUMB_DEF
@ REFERENCED_DYNAMICALLY
@ REFERENCE_TYPE
@ MAX_LIBRARY_ORDINAL
@ N_SYMBOL_RESOLVER
@ REFERENCE_FLAG_UNDEFINED_LAZY
@ EXECUTABLE_ORDINAL
@ REFERENCE_FLAG_UNDEFINED_NON_LAZY
@ REFERENCE_FLAG_DEFINED
@ SELF_LIBRARY_ORDINAL

◆ anonymous enum

anonymous enum
Enumerator
RZ_ABS 
RZ_SCATTERED 

Definition at line 484 of file mach0_defines.h.

484  {
485  // Constant values for the r_symbolnum field in an
486  // llvm::MachO::relocation_info structure when r_extern is 0.
487  RZ_ABS = 0,
488 
489  // Constant bits for the r_address field in an
490  // llvm::MachO::relocation_info structure.
491  RZ_SCATTERED = 0x80000000
492 };
@ RZ_ABS
@ RZ_SCATTERED

◆ anonymous enum

anonymous enum
Enumerator
VM_PROT_READ 
VM_PROT_WRITE 
VM_PROT_EXECUTE 

Definition at line 583 of file mach0_defines.h.

583  {
584  VM_PROT_READ = 0x1,
585  VM_PROT_WRITE = 0x2,
586  VM_PROT_EXECUTE = 0x4
587 };
@ VM_PROT_WRITE
@ VM_PROT_EXECUTE
@ VM_PROT_READ

◆ anonymous enum

anonymous enum
Enumerator
CPU_ARCH_MASK 
CPU_ARCH_ABI64 
CPU_ARCH_ABI32 

Definition at line 1070 of file mach0_defines.h.

1070  {
1071  // Capability bits used in the definition of cpu_type.
1072  CPU_ARCH_MASK = 0xff000000, // Mask for architecture bits
1073  CPU_ARCH_ABI64 = 0x01000000, // 64 bit ABI
1074  CPU_ARCH_ABI32 = 0x02000000 // Used for ARM64_32 (new Apple Watch)
1075 };
@ CPU_ARCH_ABI64
@ CPU_ARCH_MASK
@ CPU_ARCH_ABI32

◆ anonymous enum

anonymous enum
Enumerator
CPU_SUBTYPE_MASK 
CPU_SUBTYPE_LIB64 
CPU_SUBTYPE_MULTIPLE 

Definition at line 1098 of file mach0_defines.h.

1098  {
1099  // Capability bits used in the definition of cpusubtype.
1100  CPU_SUBTYPE_MASK = 0xff000000, // Mask for architecture bits
1101  CPU_SUBTYPE_LIB64 = 0x80000000, // 64 bit libraries
1102 
1103  // Special CPU subtype constants.
1104  CPU_SUBTYPE_MULTIPLE = ~0u
1105 };
@ CPU_SUBTYPE_LIB64
@ CPU_SUBTYPE_MULTIPLE
@ CPU_SUBTYPE_MASK

◆ anonymous enum

anonymous enum
Enumerator
CPU_SUBTYPE_INTEL_FAMILY_MAX 
CPU_SUBTYPE_INTEL_MODEL_ALL 

Definition at line 1145 of file mach0_defines.h.

1145  {
1148 };
@ CPU_SUBTYPE_INTEL_FAMILY_MAX
@ CPU_SUBTYPE_INTEL_MODEL_ALL

◆ anonymous enum

anonymous enum
Enumerator
DYLD_CHAINED_PTR_START_NONE 
DYLD_CHAINED_PTR_START_MULTI 
DYLD_CHAINED_PTR_START_LAST 

Definition at line 1468 of file mach0_defines.h.

1468  {
1469  DYLD_CHAINED_PTR_START_NONE = 0xFFFF,
1471  DYLD_CHAINED_PTR_START_LAST = 0x8000,
1472 };
@ DYLD_CHAINED_PTR_START_MULTI
@ DYLD_CHAINED_PTR_START_NONE
@ DYLD_CHAINED_PTR_START_LAST

◆ anonymous enum

anonymous enum
Enumerator
DYLD_CHAINED_PTR_ARM64E 
DYLD_CHAINED_PTR_64 
DYLD_CHAINED_PTR_32 
DYLD_CHAINED_PTR_32_CACHE 
DYLD_CHAINED_PTR_32_FIRMWARE 
DYLD_CHAINED_PTR_64_OFFSET 
DYLD_CHAINED_PTR_ARM64E_KERNEL 
DYLD_CHAINED_PTR_64_KERNEL_CACHE 
DYLD_CHAINED_PTR_ARM64E_USERLAND24 

Definition at line 1474 of file mach0_defines.h.

1474  {
1476  DYLD_CHAINED_PTR_64 = 2,
1477  DYLD_CHAINED_PTR_32 = 3,
1484 };
@ DYLD_CHAINED_PTR_64_OFFSET
@ DYLD_CHAINED_PTR_64
@ DYLD_CHAINED_PTR_ARM64E_USERLAND24
@ DYLD_CHAINED_PTR_32_FIRMWARE
@ DYLD_CHAINED_PTR_ARM64E
@ DYLD_CHAINED_PTR_32_CACHE
@ DYLD_CHAINED_PTR_64_KERNEL_CACHE
@ DYLD_CHAINED_PTR_32
@ DYLD_CHAINED_PTR_ARM64E_KERNEL

◆ BindOpcode

enum BindOpcode
Enumerator
BIND_OPCODE_DONE 
BIND_OPCODE_SET_DYLIB_ORDINAL_IMM 
BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB 
BIND_OPCODE_SET_DYLIB_SPECIAL_IMM 
BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM 
BIND_OPCODE_SET_TYPE_IMM 
BIND_OPCODE_SET_ADDEND_SLEB 
BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB 
BIND_OPCODE_ADD_ADDR_ULEB 
BIND_OPCODE_DO_BIND 
BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB 
BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED 
BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB 
BIND_OPCODE_THREADED 

Definition at line 360 of file mach0_defines.h.

360  {
361  BIND_OPCODE_DONE = 0x00u,
366  BIND_OPCODE_SET_TYPE_IMM = 0x50u,
370  BIND_OPCODE_DO_BIND = 0x90u,
374  BIND_OPCODE_THREADED = 0xD0u
375 };
@ BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB
@ BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
@ BIND_OPCODE_SET_DYLIB_SPECIAL_IMM
@ BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
@ BIND_OPCODE_ADD_ADDR_ULEB
@ BIND_OPCODE_SET_TYPE_IMM
@ BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
@ BIND_OPCODE_DO_BIND
@ BIND_OPCODE_SET_ADDEND_SLEB
@ BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB
@ BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
@ BIND_OPCODE_THREADED
@ BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
@ BIND_OPCODE_DONE

◆ BindSpecialDylib

Enumerator
BIND_SPECIAL_DYLIB_SELF 
BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE 
BIND_SPECIAL_DYLIB_FLAT_LOOKUP 

Definition at line 346 of file mach0_defines.h.

346  {
350 };
@ BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE
@ BIND_SPECIAL_DYLIB_SELF
@ BIND_SPECIAL_DYLIB_FLAT_LOOKUP

◆ BindSubOpcode

Enumerator
BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB 
BIND_SUBOPCODE_THREADED_APPLY 

Definition at line 377 of file mach0_defines.h.

377  {
380 };
@ BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB
@ BIND_SUBOPCODE_THREADED_APPLY

◆ BindType

enum BindType
Enumerator
BIND_TYPE_POINTER 
BIND_TYPE_TEXT_ABSOLUTE32 
BIND_TYPE_TEXT_PCREL32 

Definition at line 340 of file mach0_defines.h.

340  {
341  BIND_TYPE_POINTER = 1u,
344 };
@ BIND_TYPE_TEXT_ABSOLUTE32
@ BIND_TYPE_POINTER
@ BIND_TYPE_TEXT_PCREL32

◆ CPUSubTypeARM

Enumerator
CPU_SUBTYPE_ARM_ALL 
CPU_SUBTYPE_ARM_V4T 
CPU_SUBTYPE_ARM_V6 
CPU_SUBTYPE_ARM_V5 
CPU_SUBTYPE_ARM_V5TEJ 
CPU_SUBTYPE_ARM_XSCALE 
CPU_SUBTYPE_ARM_V7 
CPU_SUBTYPE_ARM_V7F 
CPU_SUBTYPE_ARM_V7S 
CPU_SUBTYPE_ARM_V7K 
CPU_SUBTYPE_ARM_V6M 
CPU_SUBTYPE_ARM_V7M 
CPU_SUBTYPE_ARM_V7EM 

Definition at line 1150 of file mach0_defines.h.

1150  {
1151  CPU_SUBTYPE_ARM_ALL = 0,
1152  CPU_SUBTYPE_ARM_V4T = 5,
1153  CPU_SUBTYPE_ARM_V6 = 6,
1154  CPU_SUBTYPE_ARM_V5 = 7,
1157  CPU_SUBTYPE_ARM_V7 = 9,
1158  CPU_SUBTYPE_ARM_V7F = 10,
1159  CPU_SUBTYPE_ARM_V7S = 11,
1160  CPU_SUBTYPE_ARM_V7K = 12,
1161  CPU_SUBTYPE_ARM_V6M = 14,
1162  CPU_SUBTYPE_ARM_V7M = 15,
1164 };
@ CPU_SUBTYPE_ARM_XSCALE
@ CPU_SUBTYPE_ARM_V7
@ CPU_SUBTYPE_ARM_V5
@ CPU_SUBTYPE_ARM_V7M
@ CPU_SUBTYPE_ARM_V5TEJ
@ CPU_SUBTYPE_ARM_V7K
@ CPU_SUBTYPE_ARM_V7EM
@ CPU_SUBTYPE_ARM_V7F
@ CPU_SUBTYPE_ARM_V4T
@ CPU_SUBTYPE_ARM_ALL
@ CPU_SUBTYPE_ARM_V7S
@ CPU_SUBTYPE_ARM_V6M
@ CPU_SUBTYPE_ARM_V6

◆ CPUSubTypeARM64

Enumerator
CPU_SUBTYPE_ARM64_ALL 
CPU_SUBTYPE_ARM64_V8 
CPU_SUBTYPE_ARM64E 

Definition at line 1166 of file mach0_defines.h.

1166  {
1169  CPU_SUBTYPE_ARM64E = 2
1170 };
@ CPU_SUBTYPE_ARM64_V8
@ CPU_SUBTYPE_ARM64E
@ CPU_SUBTYPE_ARM64_ALL

◆ CPUSubTypeHPPA

Enumerator
CPU_SUBTYPE_HPPA_ALL 
CPU_SUBTYPE_HPPA_7100 
CPU_SUBTYPE_HPPA_7100LC 

Definition at line 1235 of file mach0_defines.h.

1235  {
1239 };
@ CPU_SUBTYPE_HPPA_7100
@ CPU_SUBTYPE_HPPA_7100LC
@ CPU_SUBTYPE_HPPA_ALL

◆ CPUSubTypeI860

Enumerator
CPU_SUBTYPE_I860_ALL 
CPU_SUBTYPE_I860_860 

Definition at line 1241 of file mach0_defines.h.

1241  {
1244 };
@ CPU_SUBTYPE_I860_860
@ CPU_SUBTYPE_I860_ALL

◆ CPUSubTypeMC680x0

Enumerator
CPU_SUBTYPE_MC680x0_ALL 
CPU_SUBTYPE_MC68030 
CPU_SUBTYPE_MC68040 
CPU_SUBTYPE_MC68030_ONLY 

Definition at line 1222 of file mach0_defines.h.

1222  {
1224  CPU_SUBTYPE_MC68030 = 1,
1225  CPU_SUBTYPE_MC68040 = 2,
1227 };
@ CPU_SUBTYPE_MC680x0_ALL
@ CPU_SUBTYPE_MC68030
@ CPU_SUBTYPE_MC68030_ONLY
@ CPU_SUBTYPE_MC68040

◆ CPUSubTypeMC88000

Enumerator
CPU_SUBTYPE_MC88000_ALL 
CPU_SUBTYPE_MC88100 
CPU_SUBTYPE_MC88110 

Definition at line 1229 of file mach0_defines.h.

1229  {
1231  CPU_SUBTYPE_MC88100 = 1,
1233 };
@ CPU_SUBTYPE_MC88000_ALL
@ CPU_SUBTYPE_MC88100
@ CPU_SUBTYPE_MC88110

◆ CPUSubTypeMIPS

Enumerator
CPU_SUBTYPE_MIPS_ALL 
CPU_SUBTYPE_MIPS_R2300 
CPU_SUBTYPE_MIPS_R2600 
CPU_SUBTYPE_MIPS_R2800 
CPU_SUBTYPE_MIPS_R2000a 
CPU_SUBTYPE_MIPS_R2000 
CPU_SUBTYPE_MIPS_R3000a 
CPU_SUBTYPE_MIPS_R3000 

Definition at line 1211 of file mach0_defines.h.

1211  {
1220 };
@ CPU_SUBTYPE_MIPS_R2000a
@ CPU_SUBTYPE_MIPS_R2000
@ CPU_SUBTYPE_MIPS_R2800
@ CPU_SUBTYPE_MIPS_R2300
@ CPU_SUBTYPE_MIPS_R3000a
@ CPU_SUBTYPE_MIPS_ALL
@ CPU_SUBTYPE_MIPS_R3000
@ CPU_SUBTYPE_MIPS_R2600

◆ CPUSubTypePowerPC

Enumerator
CPU_SUBTYPE_POWERPC_ALL 
CPU_SUBTYPE_POWERPC_601 
CPU_SUBTYPE_POWERPC_602 
CPU_SUBTYPE_POWERPC_603 
CPU_SUBTYPE_POWERPC_603e 
CPU_SUBTYPE_POWERPC_603ev 
CPU_SUBTYPE_POWERPC_604 
CPU_SUBTYPE_POWERPC_604e 
CPU_SUBTYPE_POWERPC_620 
CPU_SUBTYPE_POWERPC_750 
CPU_SUBTYPE_POWERPC_7400 
CPU_SUBTYPE_POWERPC_7450 
CPU_SUBTYPE_POWERPC_970 
CPU_SUBTYPE_MC98000_ALL 
CPU_SUBTYPE_MC98601 

Definition at line 1176 of file mach0_defines.h.

1176  {
1190 
1193 };
@ CPU_SUBTYPE_POWERPC_604e
@ CPU_SUBTYPE_POWERPC_601
@ CPU_SUBTYPE_POWERPC_ALL
@ CPU_SUBTYPE_POWERPC_603e
@ CPU_SUBTYPE_POWERPC_970
@ CPU_SUBTYPE_POWERPC_603ev
@ CPU_SUBTYPE_POWERPC_7400
@ CPU_SUBTYPE_POWERPC_620
@ CPU_SUBTYPE_POWERPC_7450
@ CPU_SUBTYPE_POWERPC_603
@ CPU_SUBTYPE_POWERPC_602
@ CPU_SUBTYPE_POWERPC_604
@ CPU_SUBTYPE_MC98601
@ CPU_SUBTYPE_MC98000_ALL
@ CPU_SUBTYPE_POWERPC_750

◆ CPUSubTypeSPARC

Enumerator
CPU_SUBTYPE_SPARC_ALL 

Definition at line 1172 of file mach0_defines.h.

1172  {
1174 };
@ CPU_SUBTYPE_SPARC_ALL

◆ CPUSubTypeVAX

Enumerator
CPU_SUBTYPE_VAX_ALL 
CPU_SUBTYPE_VAX780 
CPU_SUBTYPE_VAX785 
CPU_SUBTYPE_VAX750 
CPU_SUBTYPE_VAX730 
CPU_SUBTYPE_UVAXI 
CPU_SUBTYPE_UVAXII 
CPU_SUBTYPE_VAX8200 
CPU_SUBTYPE_VAX8500 
CPU_SUBTYPE_VAX8600 
CPU_SUBTYPE_VAX8650 
CPU_SUBTYPE_VAX8800 
CPU_SUBTYPE_UVAXIII 

Definition at line 1195 of file mach0_defines.h.

1195  {
1196  CPU_SUBTYPE_VAX_ALL = 0,
1197  CPU_SUBTYPE_VAX780 = 1,
1198  CPU_SUBTYPE_VAX785 = 2,
1199  CPU_SUBTYPE_VAX750 = 3,
1200  CPU_SUBTYPE_VAX730 = 4,
1201  CPU_SUBTYPE_UVAXI = 5,
1202  CPU_SUBTYPE_UVAXII = 6,
1203  CPU_SUBTYPE_VAX8200 = 7,
1204  CPU_SUBTYPE_VAX8500 = 8,
1205  CPU_SUBTYPE_VAX8600 = 9,
1206  CPU_SUBTYPE_VAX8650 = 10,
1207  CPU_SUBTYPE_VAX8800 = 11,
1208  CPU_SUBTYPE_UVAXIII = 12
1209 };
@ CPU_SUBTYPE_VAX8800
@ CPU_SUBTYPE_UVAXIII
@ CPU_SUBTYPE_VAX_ALL
@ CPU_SUBTYPE_VAX750
@ CPU_SUBTYPE_VAX780
@ CPU_SUBTYPE_VAX730
@ CPU_SUBTYPE_UVAXI
@ CPU_SUBTYPE_VAX8500
@ CPU_SUBTYPE_VAX8650
@ CPU_SUBTYPE_VAX785
@ CPU_SUBTYPE_VAX8600
@ CPU_SUBTYPE_UVAXII
@ CPU_SUBTYPE_VAX8200

◆ CPUSubTypeX86

Enumerator
CPU_SUBTYPE_I386_ALL 
CPU_SUBTYPE_386 
CPU_SUBTYPE_486 
CPU_SUBTYPE_486SX 
CPU_SUBTYPE_586 
CPU_SUBTYPE_PENT 
CPU_SUBTYPE_PENTPRO 
CPU_SUBTYPE_PENTII_M3 
CPU_SUBTYPE_PENTII_M5 
CPU_SUBTYPE_CELERON 
CPU_SUBTYPE_CELERON_MOBILE 
CPU_SUBTYPE_PENTIUM_3 
CPU_SUBTYPE_PENTIUM_3_M 
CPU_SUBTYPE_PENTIUM_3_XEON 
CPU_SUBTYPE_PENTIUM_M 
CPU_SUBTYPE_PENTIUM_4 
CPU_SUBTYPE_PENTIUM_4_M 
CPU_SUBTYPE_ITANIUM 
CPU_SUBTYPE_ITANIUM_2 
CPU_SUBTYPE_XEON 
CPU_SUBTYPE_XEON_MP 
CPU_SUBTYPE_X86_ALL 
CPU_SUBTYPE_X86_64_ALL 
CPU_SUBTYPE_X86_ARCH1 
CPU_SUBTYPE_X86_64_H 

Definition at line 1108 of file mach0_defines.h.

1108  {
1110  CPU_SUBTYPE_386 = 3,
1111  CPU_SUBTYPE_486 = 4,
1112  CPU_SUBTYPE_486SX = 0x84,
1113  CPU_SUBTYPE_586 = 5,
1115  CPU_SUBTYPE_PENTPRO = 0x16,
1116  CPU_SUBTYPE_PENTII_M3 = 0x36,
1117  CPU_SUBTYPE_PENTII_M5 = 0x56,
1118  CPU_SUBTYPE_CELERON = 0x67,
1120  CPU_SUBTYPE_PENTIUM_3 = 0x08,
1121  CPU_SUBTYPE_PENTIUM_3_M = 0x18,
1123  CPU_SUBTYPE_PENTIUM_M = 0x09,
1124  CPU_SUBTYPE_PENTIUM_4 = 0x0a,
1125  CPU_SUBTYPE_PENTIUM_4_M = 0x1a,
1126  CPU_SUBTYPE_ITANIUM = 0x0b,
1127  CPU_SUBTYPE_ITANIUM_2 = 0x1b,
1128  CPU_SUBTYPE_XEON = 0x0c,
1129  CPU_SUBTYPE_XEON_MP = 0x1c,
1130 
1131  CPU_SUBTYPE_X86_ALL = 3,
1135 };
@ CPU_SUBTYPE_X86_ALL
@ CPU_SUBTYPE_PENTIUM_M
@ CPU_SUBTYPE_X86_64_ALL
@ CPU_SUBTYPE_ITANIUM
@ CPU_SUBTYPE_586
@ CPU_SUBTYPE_PENTIUM_3
@ CPU_SUBTYPE_PENT
@ CPU_SUBTYPE_PENTIUM_3_XEON
@ CPU_SUBTYPE_PENTII_M3
@ CPU_SUBTYPE_PENTIUM_3_M
@ CPU_SUBTYPE_PENTII_M5
@ CPU_SUBTYPE_486
@ CPU_SUBTYPE_PENTIUM_4_M
@ CPU_SUBTYPE_X86_ARCH1
@ CPU_SUBTYPE_CELERON
@ CPU_SUBTYPE_I386_ALL
@ CPU_SUBTYPE_ITANIUM_2
@ CPU_SUBTYPE_486SX
@ CPU_SUBTYPE_XEON_MP
@ CPU_SUBTYPE_CELERON_MOBILE
@ CPU_SUBTYPE_XEON
@ CPU_SUBTYPE_X86_64_H
@ CPU_SUBTYPE_PENTPRO
@ CPU_SUBTYPE_PENTIUM_4
@ CPU_SUBTYPE_386

◆ CPUType

enum CPUType
Enumerator
CPU_TYPE_ANY 
CPU_TYPE_VAX 
CPU_TYPE_MC680x0 
CPU_TYPE_X86 
CPU_TYPE_I386 
CPU_TYPE_X86_64 
CPU_TYPE_MIPS 
CPU_TYPE_MC98000 
CPU_TYPE_HPPA 
CPU_TYPE_ARM 
CPU_TYPE_ARM64 
CPU_TYPE_ARM64_32 
CPU_TYPE_MC88000 
CPU_TYPE_SPARC 
CPU_TYPE_I860 
CPU_TYPE_POWERPC 
CPU_TYPE_POWERPC64 

Definition at line 1078 of file mach0_defines.h.

1078  {
1079  CPU_TYPE_ANY = -1,
1080  CPU_TYPE_VAX = 1,
1081  CPU_TYPE_MC680x0 = 6,
1082  CPU_TYPE_X86 = 7,
1085  CPU_TYPE_MIPS = 8,
1086  CPU_TYPE_MC98000 = 10, // Old Motorola PowerPC
1087  CPU_TYPE_HPPA = 11,
1088  CPU_TYPE_ARM = 12,
1091  CPU_TYPE_MC88000 = 13,
1092  CPU_TYPE_SPARC = 14,
1093  CPU_TYPE_I860 = 15,
1094  CPU_TYPE_POWERPC = 18,
1096 };
@ CPU_TYPE_POWERPC
@ CPU_TYPE_X86
@ CPU_TYPE_VAX
@ CPU_TYPE_POWERPC64
@ CPU_TYPE_I386
@ CPU_TYPE_MC680x0
@ CPU_TYPE_ANY
@ CPU_TYPE_ARM64_32
@ CPU_TYPE_MC98000
@ CPU_TYPE_ARM
@ CPU_TYPE_X86_64
@ CPU_TYPE_SPARC
@ CPU_TYPE_MIPS
@ CPU_TYPE_ARM64
@ CPU_TYPE_I860
@ CPU_TYPE_HPPA
@ CPU_TYPE_MC88000

◆ DataRegionType

Enumerator
DICE_KIND_DATA 
DICE_KIND_JUMP_TABLE8 
DICE_KIND_JUMP_TABLE16 
DICE_KIND_JUMP_TABLE32 
DICE_KIND_ABS_JUMP_TABLE32 

Definition at line 308 of file mach0_defines.h.

308  {
309  // Constants for the "kind" field in a data_in_code_entry structure
310  DICE_KIND_DATA = 1u,
315 };
@ DICE_KIND_DATA
@ DICE_KIND_JUMP_TABLE32
@ DICE_KIND_ABS_JUMP_TABLE32
@ DICE_KIND_JUMP_TABLE8
@ DICE_KIND_JUMP_TABLE16

◆ ExportSymbolKind

Enumerator
EXPORT_SYMBOL_FLAGS_KIND_REGULAR 
EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL 
EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE 

Definition at line 389 of file mach0_defines.h.

389  {
393 };
#define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL
#define EXPORT_SYMBOL_FLAGS_KIND_REGULAR
#define EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE

◆ HeaderFileType

Enumerator
MH_OBJECT 
MH_EXECUTE 
MH_FVMLIB 
MH_CORE 
MH_PRELOAD 
MH_DYLIB 
MH_DYLINKER 
MH_BUNDLE 
MH_DYLIB_STUB 
MH_DSYM 
MH_KEXT_BUNDLE 
MH_FILESET 

Definition at line 69 of file mach0_defines.h.

69  {
70  // Constants for the "filetype" field in llvm::MachO::mach_header and
71  // llvm::MachO::mach_header_64
72  MH_OBJECT = 0x1u,
73  MH_EXECUTE = 0x2u,
74  MH_FVMLIB = 0x3u,
75  MH_CORE = 0x4u,
76  MH_PRELOAD = 0x5u,
77  MH_DYLIB = 0x6u,
78  MH_DYLINKER = 0x7u,
79  MH_BUNDLE = 0x8u,
80  MH_DYLIB_STUB = 0x9u,
81  MH_DSYM = 0xAu,
82  MH_KEXT_BUNDLE = 0xBu,
83  MH_FILESET = 0xCu
84 };
@ MH_FVMLIB
Definition: mach0_defines.h:74
@ MH_KEXT_BUNDLE
Definition: mach0_defines.h:82
@ MH_DSYM
Definition: mach0_defines.h:81
@ MH_PRELOAD
Definition: mach0_defines.h:76
@ MH_DYLIB_STUB
Definition: mach0_defines.h:80
@ MH_BUNDLE
Definition: mach0_defines.h:79
@ MH_EXECUTE
Definition: mach0_defines.h:73
@ MH_DYLINKER
Definition: mach0_defines.h:78
@ MH_OBJECT
Definition: mach0_defines.h:72
@ MH_FILESET
Definition: mach0_defines.h:83
@ MH_CORE
Definition: mach0_defines.h:75
@ MH_DYLIB
Definition: mach0_defines.h:77

◆ LoadCommandType

Enumerator
LC_SEGMENT 
LC_SYMTAB 
LC_SYMSEG 
LC_THREAD 
LC_UNIXTHREAD 
LC_LOADFVMLIB 
LC_IDFVMLIB 
LC_IDENT 
LC_FVMFILE 
LC_PREPAGE 
LC_DYSYMTAB 
LC_LOAD_DYLIB 
LC_ID_DYLIB 
LC_LOAD_DYLINKER 
LC_ID_DYLINKER 
LC_PREBOUND_DYLIB 
LC_ROUTINES 
LC_SUB_FRAMEWORK 
LC_SUB_UMBRELLA 
LC_SUB_CLIENT 
LC_SUB_LIBRARY 
LC_TWOLEVEL_HINTS 
LC_PREBIND_CKSUM 
LC_LOAD_WEAK_DYLIB 
LC_SEGMENT_64 
LC_ROUTINES_64 
LC_UUID 
LC_RPATH 
LC_CODE_SIGNATURE 
LC_SEGMENT_SPLIT_INFO 
LC_REEXPORT_DYLIB 
LC_LAZY_LOAD_DYLIB 
LC_ENCRYPTION_INFO 
LC_DYLD_INFO 
LC_DYLD_INFO_ONLY 
LC_LOAD_UPWARD_DYLIB 
LC_VERSION_MIN_MACOSX 
LC_VERSION_MIN_IPHONEOS 
LC_FUNCTION_STARTS 
LC_DYLD_ENVIRONMENT 
LC_MAIN 
LC_DATA_IN_CODE 
LC_SOURCE_VERSION 
LC_DYLIB_CODE_SIGN_DRS 
LC_ENCRYPTION_INFO_64 
LC_LINKER_OPTION 
LC_LINKER_OPTIMIZATION_HINT 
LC_VERSION_MIN_TVOS 
LC_VERSION_MIN_WATCHOS 
LC_NOTE 
LC_BUILD_VERSION 
LC_DYLD_EXPORTS_TRIE 
LC_DYLD_CHAINED_FIXUPS 
LC_KEXT 

Definition at line 122 of file mach0_defines.h.

122  {
123  // Constants for the "cmd" field in llvm::MachO::load_command
124  LC_SEGMENT = 0x00000001u,
125  LC_SYMTAB = 0x00000002u,
126  LC_SYMSEG = 0x00000003u,
127  LC_THREAD = 0x00000004u,
128  LC_UNIXTHREAD = 0x00000005u,
129  LC_LOADFVMLIB = 0x00000006u,
130  LC_IDFVMLIB = 0x00000007u,
131  LC_IDENT = 0x00000008u,
132  LC_FVMFILE = 0x00000009u,
133  LC_PREPAGE = 0x0000000Au,
134  LC_DYSYMTAB = 0x0000000Bu,
135  LC_LOAD_DYLIB = 0x0000000Cu,
136  LC_ID_DYLIB = 0x0000000Du,
137  LC_LOAD_DYLINKER = 0x0000000Eu,
138  LC_ID_DYLINKER = 0x0000000Fu,
139  LC_PREBOUND_DYLIB = 0x00000010u,
140  LC_ROUTINES = 0x00000011u,
141  LC_SUB_FRAMEWORK = 0x00000012u,
142  LC_SUB_UMBRELLA = 0x00000013u,
143  LC_SUB_CLIENT = 0x00000014u,
144  LC_SUB_LIBRARY = 0x00000015u,
145  LC_TWOLEVEL_HINTS = 0x00000016u,
146  LC_PREBIND_CKSUM = 0x00000017u,
147  LC_LOAD_WEAK_DYLIB = 0x80000018u,
148  LC_SEGMENT_64 = 0x00000019u,
149  LC_ROUTINES_64 = 0x0000001Au,
150  LC_UUID = 0x0000001Bu,
151  LC_RPATH = 0x8000001Cu,
152  LC_CODE_SIGNATURE = 0x0000001Du,
153  LC_SEGMENT_SPLIT_INFO = 0x0000001Eu,
154  LC_REEXPORT_DYLIB = 0x8000001Fu,
155  LC_LAZY_LOAD_DYLIB = 0x00000020u,
156  LC_ENCRYPTION_INFO = 0x00000021u,
157  LC_DYLD_INFO = 0x00000022u,
158  LC_DYLD_INFO_ONLY = 0x80000022u,
159  LC_LOAD_UPWARD_DYLIB = 0x80000023u,
160  LC_VERSION_MIN_MACOSX = 0x00000024u,
161  LC_VERSION_MIN_IPHONEOS = 0x00000025u,
162  LC_FUNCTION_STARTS = 0x00000026u,
163  LC_DYLD_ENVIRONMENT = 0x00000027u,
164  LC_MAIN = 0x80000028u,
165  LC_DATA_IN_CODE = 0x00000029u,
166  LC_SOURCE_VERSION = 0x0000002Au,
167  LC_DYLIB_CODE_SIGN_DRS = 0x0000002Bu,
168  LC_ENCRYPTION_INFO_64 = 0x0000002Cu,
169  LC_LINKER_OPTION = 0x0000002Du,
170  LC_LINKER_OPTIMIZATION_HINT = 0x0000002Eu,
171  LC_VERSION_MIN_TVOS = 0x0000002Fu,
172  LC_VERSION_MIN_WATCHOS = 0x00000030u,
173  LC_NOTE = 0x00000031u,
174  LC_BUILD_VERSION = 0x00000032u,
175  LC_DYLD_EXPORTS_TRIE = 0x80000033u,
176  LC_DYLD_CHAINED_FIXUPS = 0x80000034u,
177  LC_KEXT = 0x80000035u, /* TODO: get the right name */
178  /*
179 Load command 9
180  cmd LC_BUILD_VERSION
181  cmdsize 32
182  platform macos
183  sdk 10.14
184  minos 10.14
185  ntools 1
186  tool ld
187  version 409.11
188 */
189 };
@ LC_FVMFILE
@ LC_DYLD_EXPORTS_TRIE
@ LC_DYSYMTAB
@ LC_KEXT
@ LC_LOAD_UPWARD_DYLIB
@ LC_SEGMENT
@ LC_VERSION_MIN_IPHONEOS
@ LC_IDENT
@ LC_NOTE
@ LC_ROUTINES
@ LC_LOAD_WEAK_DYLIB
@ LC_ID_DYLINKER
@ LC_MAIN
@ LC_THREAD
@ LC_DYLD_INFO
@ LC_DYLD_INFO_ONLY
@ LC_DYLIB_CODE_SIGN_DRS
@ LC_SUB_CLIENT
@ LC_PREBOUND_DYLIB
@ LC_ENCRYPTION_INFO_64
@ LC_BUILD_VERSION
@ LC_LOADFVMLIB
@ LC_DATA_IN_CODE
@ LC_RPATH
@ LC_VERSION_MIN_WATCHOS
@ LC_UNIXTHREAD
@ LC_SUB_UMBRELLA
@ LC_LOAD_DYLIB
@ LC_DYLD_CHAINED_FIXUPS
@ LC_SYMTAB
@ LC_TWOLEVEL_HINTS
@ LC_LAZY_LOAD_DYLIB
@ LC_ENCRYPTION_INFO
@ LC_SUB_FRAMEWORK
@ LC_ID_DYLIB
@ LC_PREPAGE
@ LC_PREBIND_CKSUM
@ LC_SUB_LIBRARY
@ LC_LOAD_DYLINKER
@ LC_FUNCTION_STARTS
@ LC_SOURCE_VERSION
@ LC_LINKER_OPTIMIZATION_HINT
@ LC_SEGMENT_64
@ LC_VERSION_MIN_TVOS
@ LC_ROUTINES_64
@ LC_SYMSEG
@ LC_IDFVMLIB
@ LC_VERSION_MIN_MACOSX
@ LC_SEGMENT_SPLIT_INFO
@ LC_DYLD_ENVIRONMENT
@ LC_UUID
@ LC_LINKER_OPTION
@ LC_CODE_SIGNATURE
@ LC_REEXPORT_DYLIB

◆ NListType

enum NListType
Enumerator
N_UNDF 
N_ABS 
N_SECT 
N_PBUD 
N_INDR 

Definition at line 404 of file mach0_defines.h.

404  {
405  // Constants for the "n_type & N_TYPE" llvm::MachO::nlist and
406  // llvm::MachO::nlist_64
407  N_UNDF = 0x0u,
408  N_ABS = 0x2u,
409  N_SECT = 0xeu,
410  N_PBUD = 0xcu,
411  N_INDR = 0xau
412 };
@ N_INDR
@ N_SECT
@ N_PBUD
@ N_UNDF
@ N_ABS

◆ RebaseOpcode

Enumerator
REBASE_OPCODE_DONE 
REBASE_OPCODE_SET_TYPE_IMM 
REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB 
REBASE_OPCODE_ADD_ADDR_ULEB 
REBASE_OPCODE_ADD_ADDR_IMM_SCALED 
REBASE_OPCODE_DO_REBASE_IMM_TIMES 
REBASE_OPCODE_DO_REBASE_ULEB_TIMES 
REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB 
REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB 

Definition at line 328 of file mach0_defines.h.

328  {
329  REBASE_OPCODE_DONE = 0x00u,
338 };
@ REBASE_OPCODE_ADD_ADDR_IMM_SCALED
@ REBASE_OPCODE_SET_TYPE_IMM
@ REBASE_OPCODE_ADD_ADDR_ULEB
@ REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
@ REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB
@ REBASE_OPCODE_DO_REBASE_IMM_TIMES
@ REBASE_OPCODE_DO_REBASE_ULEB_TIMES
@ REBASE_OPCODE_DONE
@ REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB

◆ RebaseType

enum RebaseType
Enumerator
REBASE_TYPE_POINTER 
REBASE_TYPE_TEXT_ABSOLUTE32 
REBASE_TYPE_TEXT_PCREL32 

Definition at line 317 of file mach0_defines.h.

317  {
318  REBASE_TYPE_POINTER = 1u,
321 };
@ REBASE_TYPE_POINTER
@ REBASE_TYPE_TEXT_PCREL32
@ REBASE_TYPE_TEXT_ABSOLUTE32

◆ RelocationInfoType

Enumerator
GENERIC_RELOC_VANILLA 
GENERIC_RELOC_PAIR 
GENERIC_RELOC_SECTDIFF 
GENERIC_RELOC_PB_LA_PTR 
GENERIC_RELOC_LOCAL_SECTDIFF 
GENERIC_RELOC_TLV 
PPC_RELOC_VANILLA 
PPC_RELOC_PAIR 
PPC_RELOC_BR14 
PPC_RELOC_BR24 
PPC_RELOC_HI16 
PPC_RELOC_LO16 
PPC_RELOC_HA16 
PPC_RELOC_LO14 
PPC_RELOC_SECTDIFF 
PPC_RELOC_PB_LA_PTR 
PPC_RELOC_HI16_SECTDIFF 
PPC_RELOC_LO16_SECTDIFF 
PPC_RELOC_HA16_SECTDIFF 
PPC_RELOC_JBSR 
PPC_RELOC_LO14_SECTDIFF 
PPC_RELOC_LOCAL_SECTDIFF 
ARM_RELOC_VANILLA 
ARM_RELOC_PAIR 
ARM_RELOC_SECTDIFF 
ARM_RELOC_LOCAL_SECTDIFF 
ARM_RELOC_PB_LA_PTR 
ARM_RELOC_BR24 
ARM_THUMB_RELOC_BR22 
ARM_THUMB_32BIT_BRANCH 
ARM_RELOC_HALF 
ARM_RELOC_HALF_SECTDIFF 
ARM64_RELOC_UNSIGNED 
ARM64_RELOC_SUBTRACTOR 
ARM64_RELOC_BRANCH26 
ARM64_RELOC_PAGE21 
ARM64_RELOC_PAGEOFF12 
ARM64_RELOC_GOT_LOAD_PAGE21 
ARM64_RELOC_GOT_LOAD_PAGEOFF12 
ARM64_RELOC_POINTER_TO_GOT 
ARM64_RELOC_TLVP_LOAD_PAGE21 
ARM64_RELOC_TLVP_LOAD_PAGEOFF12 
ARM64_RELOC_ADDEND 
X86_64_RELOC_UNSIGNED 
X86_64_RELOC_SIGNED 
X86_64_RELOC_BRANCH 
X86_64_RELOC_GOT_LOAD 
X86_64_RELOC_GOT 
X86_64_RELOC_SUBTRACTOR 
X86_64_RELOC_SIGNED_1 
X86_64_RELOC_SIGNED_2 
X86_64_RELOC_SIGNED_4 
X86_64_RELOC_TLV 

Definition at line 494 of file mach0_defines.h.

494  {
495  // Constant values for the r_type field in an
496  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
497  // structure.
499  GENERIC_RELOC_PAIR = 1,
503  GENERIC_RELOC_TLV = 5,
504 
505  // Constant values for the r_type field in a PowerPC architecture
506  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
507  // structure.
510  PPC_RELOC_BR14 = 2,
511  PPC_RELOC_BR24 = 3,
512  PPC_RELOC_HI16 = 4,
513  PPC_RELOC_LO16 = 5,
514  PPC_RELOC_HA16 = 6,
515  PPC_RELOC_LO14 = 7,
516  PPC_RELOC_SECTDIFF = 8,
521  PPC_RELOC_JBSR = 13,
524 
525  // Constant values for the r_type field in an ARM architecture
526  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
527  // structure.
533  ARM_RELOC_BR24 = 5,
535  ARM_THUMB_32BIT_BRANCH = 7, // obsolete
536  ARM_RELOC_HALF = 8,
538 
539  // Constant values for the r_type field in an ARM64 architecture
540  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
541  // structure.
542 
543  // For pointers.
545  // Must be followed by an ARM64_RELOC_UNSIGNED
547  // A B/BL instruction with 26-bit displacement.
549  // PC-rel distance to page of target.
550  ARM64_RELOC_PAGE21 = 3,
551  // Offset within page, scaled by r_length.
553  // PC-rel distance to page of GOT slot.
555  // Offset within page of GOT slot, scaled by r_length.
557  // For pointers to GOT slots.
559  // PC-rel distance to page of TLVP slot.
561  // Offset within page of TLVP slot, scaled by r_length.
563  // Must be followed by ARM64_RELOC_PAGE21 or ARM64_RELOC_PAGEOFF12.
564  ARM64_RELOC_ADDEND = 10,
565 
566  // Constant values for the r_type field in an x86_64 architecture
567  // llvm::MachO::relocation_info or llvm::MachO::scattered_relocation_info
568  // structure
573  X86_64_RELOC_GOT = 4,
578  X86_64_RELOC_TLV = 9
579 };
@ ARM_RELOC_VANILLA
@ PPC_RELOC_LO16_SECTDIFF
@ ARM_THUMB_32BIT_BRANCH
@ X86_64_RELOC_BRANCH
@ GENERIC_RELOC_PB_LA_PTR
@ PPC_RELOC_BR24
@ GENERIC_RELOC_VANILLA
@ ARM64_RELOC_GOT_LOAD_PAGEOFF12
@ X86_64_RELOC_SIGNED_4
@ PPC_RELOC_HI16
@ ARM64_RELOC_TLVP_LOAD_PAGE21
@ ARM_RELOC_SECTDIFF
@ X86_64_RELOC_SUBTRACTOR
@ X86_64_RELOC_GOT_LOAD
@ ARM_RELOC_PAIR
@ PPC_RELOC_HA16_SECTDIFF
@ ARM_RELOC_BR24
@ ARM64_RELOC_ADDEND
@ ARM64_RELOC_UNSIGNED
@ ARM64_RELOC_GOT_LOAD_PAGE21
@ PPC_RELOC_LO14
@ X86_64_RELOC_UNSIGNED
@ GENERIC_RELOC_SECTDIFF
@ PPC_RELOC_VANILLA
@ ARM64_RELOC_PAGEOFF12
@ X86_64_RELOC_TLV
@ ARM64_RELOC_POINTER_TO_GOT
@ X86_64_RELOC_SIGNED
@ ARM_RELOC_LOCAL_SECTDIFF
@ ARM_RELOC_HALF
@ PPC_RELOC_PAIR
@ PPC_RELOC_HI16_SECTDIFF
@ ARM64_RELOC_TLVP_LOAD_PAGEOFF12
@ X86_64_RELOC_SIGNED_2
@ ARM64_RELOC_PAGE21
@ X86_64_RELOC_GOT
@ PPC_RELOC_LO14_SECTDIFF
@ X86_64_RELOC_SIGNED_1
@ PPC_RELOC_LOCAL_SECTDIFF
@ PPC_RELOC_HA16
@ GENERIC_RELOC_LOCAL_SECTDIFF
@ ARM_THUMB_RELOC_BR22
@ ARM64_RELOC_SUBTRACTOR
@ GENERIC_RELOC_PAIR
@ ARM_RELOC_PB_LA_PTR
@ GENERIC_RELOC_TLV
@ PPC_RELOC_SECTDIFF
@ PPC_RELOC_BR14
@ PPC_RELOC_LO16
@ ARM64_RELOC_BRANCH26
@ PPC_RELOC_PB_LA_PTR
@ ARM_RELOC_HALF_SECTDIFF
@ PPC_RELOC_JBSR

◆ SectionOrdinal

Enumerator
NO_SECT 
MAX_SECT 

Definition at line 414 of file mach0_defines.h.

414  {
415  // Constants for the "n_sect" field in llvm::MachO::nlist and
416  // llvm::MachO::nlist_64
417  NO_SECT = 0u,
418  MAX_SECT = 0xffu
419 };
@ NO_SECT
@ MAX_SECT

◆ SectionType

These are the section type and attributes fields. A MachO section can have only one Type, but can have any of the attributes specified.

Enumerator
S_REGULAR 

S_REGULAR - Regular section.

S_ZEROFILL 

S_ZEROFILL - Zero fill on demand section.

S_CSTRING_LITERALS 

S_CSTRING_LITERALS - Section with literal C strings.

S_4BYTE_LITERALS 

S_4BYTE_LITERALS - Section with 4 byte literals.

S_8BYTE_LITERALS 

S_8BYTE_LITERALS - Section with 8 byte literals.

S_LITERAL_POINTERS 

S_LITERAL_POINTERS - Section with pointers to literals.

S_NON_LAZY_SYMBOL_POINTERS 

S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.

S_LAZY_SYMBOL_POINTERS 

S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.

S_SYMBOL_STUBS 

S_SYMBOL_STUBS - Section with symbol stubs, byte size of stub in the Reserved2 field.

S_MOD_INIT_FUNC_POINTERS 

S_MOD_INIT_FUNC_POINTERS - Section with only function pointers for initialization.

S_MOD_TERM_FUNC_POINTERS 

S_MOD_TERM_FUNC_POINTERS - Section with only function pointers for termination.

S_COALESCED 

S_COALESCED - Section contains symbols that are to be coalesced.

S_GB_ZEROFILL 

S_GB_ZEROFILL - Zero fill on demand section (that can be larger than 4 gigabytes).

S_INTERPOSING 

S_INTERPOSING - Section with only pairs of function pointers for interposing.

S_16BYTE_LITERALS 

S_16BYTE_LITERALS - Section with only 16 byte literals.

S_DTRACE_DOF 

S_DTRACE_DOF - Section contains DTrace Object Format.

S_LAZY_DYLIB_SYMBOL_POINTERS 

S_LAZY_DYLIB_SYMBOL_POINTERS - Section with lazy symbol pointers to lazy loaded dylibs.

S_THREAD_LOCAL_REGULAR 

S_THREAD_LOCAL_REGULAR - Thread local data section.

S_THREAD_LOCAL_ZEROFILL 

S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.

S_THREAD_LOCAL_VARIABLES 

S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.

S_THREAD_LOCAL_VARIABLE_POINTERS 

S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread local structures.

S_THREAD_LOCAL_INIT_FUNCTION_POINTERS 

S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local variable initialization pointers to functions.

LAST_KNOWN_SECTION_TYPE 

Definition at line 208 of file mach0_defines.h.

208  {
209  // Constant masks for the "flags[7:0]" field in llvm::MachO::section and
210  // llvm::MachO::section_64 (mask "flags" with SECTION_TYPE)
211 
213  S_REGULAR = 0x00u,
215  S_ZEROFILL = 0x01u,
217  S_CSTRING_LITERALS = 0x02u,
219  S_4BYTE_LITERALS = 0x03u,
221  S_8BYTE_LITERALS = 0x04u,
223  S_LITERAL_POINTERS = 0x05u,
227  S_LAZY_SYMBOL_POINTERS = 0x07u,
230  S_SYMBOL_STUBS = 0x08u,
233  S_MOD_INIT_FUNC_POINTERS = 0x09u,
236  S_MOD_TERM_FUNC_POINTERS = 0x0au,
238  S_COALESCED = 0x0bu,
241  S_GB_ZEROFILL = 0x0cu,
244  S_INTERPOSING = 0x0du,
246  S_16BYTE_LITERALS = 0x0eu,
248  S_DTRACE_DOF = 0x0fu,
253  S_THREAD_LOCAL_REGULAR = 0x11u,
255  S_THREAD_LOCAL_ZEROFILL = 0x12u,
258  S_THREAD_LOCAL_VARIABLES = 0x13u,
265 
267 };
@ S_LITERAL_POINTERS
S_LITERAL_POINTERS - Section with pointers to literals.
@ S_THREAD_LOCAL_INIT_FUNCTION_POINTERS
@ S_SYMBOL_STUBS
@ S_MOD_INIT_FUNC_POINTERS
@ S_CSTRING_LITERALS
S_CSTRING_LITERALS - Section with literal C strings.
@ S_THREAD_LOCAL_VARIABLES
@ S_LAZY_DYLIB_SYMBOL_POINTERS
@ S_8BYTE_LITERALS
S_8BYTE_LITERALS - Section with 8 byte literals.
@ S_THREAD_LOCAL_REGULAR
S_THREAD_LOCAL_REGULAR - Thread local data section.
@ S_4BYTE_LITERALS
S_4BYTE_LITERALS - Section with 4 byte literals.
@ S_ZEROFILL
S_ZEROFILL - Zero fill on demand section.
@ S_NON_LAZY_SYMBOL_POINTERS
S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
@ S_COALESCED
S_COALESCED - Section contains symbols that are to be coalesced.
@ S_THREAD_LOCAL_VARIABLE_POINTERS
@ S_MOD_TERM_FUNC_POINTERS
@ S_16BYTE_LITERALS
S_16BYTE_LITERALS - Section with only 16 byte literals.
@ LAST_KNOWN_SECTION_TYPE
@ S_GB_ZEROFILL
@ S_LAZY_SYMBOL_POINTERS
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
@ S_INTERPOSING
@ S_REGULAR
S_REGULAR - Regular section.
@ S_DTRACE_DOF
S_DTRACE_DOF - Section contains DTrace Object Format.
@ S_THREAD_LOCAL_ZEROFILL
S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.

◆ StabType

enum StabType
Enumerator
N_GSYM 
N_FNAME 
N_FUN 
N_STSYM 
N_LCSYM 
N_BNSYM 
N_PC 
N_AST 
N_OPT 
N_RSYM 
N_SLINE 
N_ENSYM 
N_SSYM 
N_SO 
N_OSO 
N_LSYM 
N_BINCL 
N_SOL 
N_PARAMS 
N_VERSION 
N_OLEVEL 
N_PSYM 
N_EINCL 
N_ENTRY 
N_LBRAC 
N_EXCL 
N_RBRAC 
N_BCOMM 
N_ECOMM 
N_ECOML 
N_LENG 

Definition at line 448 of file mach0_defines.h.

448  {
449  // Constant values for the "n_type" field in llvm::MachO::nlist and
450  // llvm::MachO::nlist_64 when "(n_type & N_STAB) != 0"
451  N_GSYM = 0x20u,
452  N_FNAME = 0x22u,
453  N_FUN = 0x24u,
454  N_STSYM = 0x26u,
455  N_LCSYM = 0x28u,
456  N_BNSYM = 0x2Eu,
457  N_PC = 0x30u,
458  N_AST = 0x32u,
459  N_OPT = 0x3Cu,
460  N_RSYM = 0x40u,
461  N_SLINE = 0x44u,
462  N_ENSYM = 0x4Eu,
463  N_SSYM = 0x60u,
464  N_SO = 0x64u,
465  N_OSO = 0x66u,
466  N_LSYM = 0x80u,
467  N_BINCL = 0x82u,
468  N_SOL = 0x84u,
469  N_PARAMS = 0x86u,
470  N_VERSION = 0x88u,
471  N_OLEVEL = 0x8Au,
472  N_PSYM = 0xA0u,
473  N_EINCL = 0xA2u,
474  N_ENTRY = 0xA4u,
475  N_LBRAC = 0xC0u,
476  N_EXCL = 0xC2u,
477  N_RBRAC = 0xE0u,
478  N_BCOMM = 0xE2u,
479  N_ECOMM = 0xE4u,
480  N_ECOML = 0xE8u,
481  N_LENG = 0xFEu
482 };
@ N_SOL
@ N_FNAME
@ N_STSYM
@ N_ENTRY
@ N_OPT
@ N_PSYM
@ N_GSYM
@ N_ECOML
@ N_RSYM
@ N_BNSYM
@ N_BINCL
@ N_BCOMM
@ N_EXCL
@ N_LCSYM
@ N_SSYM
@ N_SLINE
@ N_LSYM
@ N_PC
@ N_SO
@ N_FUN
@ N_LBRAC
@ N_ECOMM
@ N_OSO
@ N_EINCL
@ N_RBRAC
@ N_VERSION
@ N_LENG
@ N_ENSYM
@ N_PARAMS
@ N_OLEVEL
@ N_AST

◆ x86_fp_control_precis

Enumerator
x86_FP_PREC_24B 
x86_FP_PREC_53B 
x86_FP_PREC_64B 

Definition at line 1270 of file mach0_defines.h.

1270  {
1271  x86_FP_PREC_24B = 0,
1272  x86_FP_PREC_53B = 2,
1273  x86_FP_PREC_64B = 3
1274 };
@ x86_FP_PREC_24B
@ x86_FP_PREC_53B
@ x86_FP_PREC_64B

◆ x86_fp_control_rc

Enumerator
x86_FP_RND_NEAR 
x86_FP_RND_DOWN 
x86_FP_RND_UP 
x86_FP_CHOP 

Definition at line 1276 of file mach0_defines.h.

1276  {
1277  x86_FP_RND_NEAR = 0,
1278  x86_FP_RND_DOWN = 1,
1279  x86_FP_RND_UP = 2,
1280  x86_FP_CHOP = 3
1281 };
@ x86_FP_RND_NEAR
@ x86_FP_CHOP
@ x86_FP_RND_UP
@ x86_FP_RND_DOWN

◆ X86ThreadFlavors

Enumerator
x86_THREAD_STATE32 
x86_FLOAT_STATE32 
x86_EXCEPTION_STATE32 
x86_THREAD_STATE64 
x86_FLOAT_STATE64 
x86_EXCEPTION_STATE64 
x86_THREAD_STATE 
x86_FLOAT_STATE 
x86_EXCEPTION_STATE 
x86_DEBUG_STATE32 
x86_DEBUG_STATE64 
x86_DEBUG_STATE 

Definition at line 1398 of file mach0_defines.h.

1398  {
1399  x86_THREAD_STATE32 = 1,
1400  x86_FLOAT_STATE32 = 2,
1402  x86_THREAD_STATE64 = 4,
1403  x86_FLOAT_STATE64 = 5,
1405  x86_THREAD_STATE = 7,
1406  x86_FLOAT_STATE = 8,
1407  x86_EXCEPTION_STATE = 9,
1408  x86_DEBUG_STATE32 = 10,
1409  x86_DEBUG_STATE64 = 11,
1410  x86_DEBUG_STATE = 12
1411 };
@ x86_DEBUG_STATE64
@ x86_EXCEPTION_STATE32
@ x86_THREAD_STATE64
@ x86_DEBUG_STATE32
@ x86_FLOAT_STATE
@ x86_EXCEPTION_STATE64
@ x86_FLOAT_STATE64
@ x86_THREAD_STATE32
@ x86_EXCEPTION_STATE
@ x86_DEBUG_STATE
@ x86_THREAD_STATE
@ x86_FLOAT_STATE32

Function Documentation

◆ CPU_SUBTYPE_INTEL()

static int CPU_SUBTYPE_INTEL ( int  Family,
int  Model 
)
inlinestatic

Definition at line 1136 of file mach0_defines.h.

1136  {
1137  return Family | (Model << 4);
1138 }

◆ CPU_SUBTYPE_INTEL_FAMILY()

static int CPU_SUBTYPE_INTEL_FAMILY ( enum CPUSubTypeX86  ST)
inlinestatic

Definition at line 1139 of file mach0_defines.h.

1139  {
1140  return ((int)ST) & 0x0f;
1141 }

◆ CPU_SUBTYPE_INTEL_MODEL()

static int CPU_SUBTYPE_INTEL_MODEL ( enum CPUSubTypeX86  ST)
inlinestatic

Definition at line 1142 of file mach0_defines.h.

1142  {
1143  return ((int)ST) >> 4;
1144 }

◆ GET_COMM_ALIGN()

static uint8_t GET_COMM_ALIGN ( uint16_t  n_desc)
inlinestatic

Definition at line 1061 of file mach0_defines.h.

1061  {
1062  return (n_desc >> 8u) & 0x0fu;
1063 }

◆ GET_LIBRARY_ORDINAL()

static uint16_t GET_LIBRARY_ORDINAL ( uint16_t  n_desc)
inlinestatic

Definition at line 1053 of file mach0_defines.h.

1053  {
1054  return (((n_desc) >> 8u) & 0xffu);
1055 }

◆ SET_COMM_ALIGN()

static void SET_COMM_ALIGN ( uint16_t n_desc,
uint8_t  align 
)
inlinestatic

Definition at line 1065 of file mach0_defines.h.

1065  {
1066  *n_desc = ((*n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u));
1067 }

◆ SET_LIBRARY_ORDINAL()

static void SET_LIBRARY_ORDINAL ( uint16_t n_desc,
uint8_t  ordinal 
)
inlinestatic

Definition at line 1057 of file mach0_defines.h.

1057  {
1058  *n_desc = (((*n_desc) & 0x00ff) | (((ordinal)&0xff) << 8));
1059 }