52 #ifndef LLVM_SUPPORT_MACHO_H
53 #define LLVM_SUPPORT_MACHO_H
1006 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN)
1054 return (((n_desc) >> 8u) & 0xffu);
1058 *n_desc = (((*n_desc) & 0x00ff) | (((ordinal)&0xff) << 8));
1062 return (n_desc >> 8u) & 0x0fu;
1066 *n_desc = ((*n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u));
1137 return Family | (Model << 4);
1140 return ((
int)ST) & 0x0f;
1143 return ((
int)ST) >> 4;
1413 #define x86_THREAD_STATE64_COUNT \
1414 sizeof(struct x86_thread_state64_t) / sizeof(uint32_t);
1415 #define x86_FLOAT_STATE64_COUNT \
1416 sizeof(struct x86_float_state64_t) / sizeof(uint32_t);
1417 #define x86_EXCEPTION_STATE64_COUNT \
1418 sizeof(struct x86_exception_state64_t) / sizeof(uint32_t);
1420 #define x86_THREAD_STATE_COUNT \
1421 sizeof(struct x86_thread_state_t) / sizeof(uint32_t);
1422 #define x86_FLOAT_STATE_COUNT \
1423 sizeof(struct x86_float_state_t) / sizeof(uint32_t);
1424 #define x86_EXCEPTION_STATE_COUNT \
1425 sizeof(struct x86_exception_state_t) / sizeof(uint32_t);
1427 #define EXPORT_SYMBOL_FLAGS_KIND_MASK 0x03
1428 #define EXPORT_SYMBOL_FLAGS_KIND_REGULAR 0x00
1429 #define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL 0x01
1430 #define EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE 0x02
1431 #define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION 0x04
1432 #define EXPORT_SYMBOL_FLAGS_REEXPORT 0x08
1433 #define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER 0x10
@ LC_VERSION_MIN_IPHONEOS
@ LC_LINKER_OPTIMIZATION_HINT
#define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL
@ S_LITERAL_POINTERS
S_LITERAL_POINTERS - Section with pointers to literals.
@ S_THREAD_LOCAL_INIT_FUNCTION_POINTERS
@ 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_LAZY_SYMBOL_POINTERS
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
@ 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.
@ CPU_SUBTYPE_INTEL_FAMILY_MAX
@ CPU_SUBTYPE_INTEL_MODEL_ALL
#define EXPORT_SYMBOL_FLAGS_KIND_REGULAR
@ CPU_SUBTYPE_MC680x0_ALL
@ CPU_SUBTYPE_MC68030_ONLY
#define EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE
static void SET_COMM_ALIGN(uint16_t *n_desc, uint8_t align)
static uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc)
@ BIND_TYPE_TEXT_ABSOLUTE32
@ BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE
@ BIND_SPECIAL_DYLIB_SELF
@ BIND_SPECIAL_DYLIB_FLAT_LOOKUP
@ S_ATTR_SOME_INSTRUCTIONS
S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.
@ 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
@ S_ATTR_SELF_MODIFYING_CODE
static int CPU_SUBTYPE_INTEL_FAMILY(enum CPUSubTypeX86 ST)
@ DICE_KIND_ABS_JUMP_TABLE32
#define EXPORT_SYMBOL_FLAGS_KIND_MASK
@ CPU_SUBTYPE_HPPA_7100LC
@ REBASE_TYPE_TEXT_PCREL32
@ REBASE_TYPE_TEXT_ABSOLUTE32
#define EXPORT_SYMBOL_FLAGS_REEXPORT
static void SET_LIBRARY_ORDINAL(uint16_t *n_desc, uint8_t ordinal)
static int CPU_SUBTYPE_INTEL_MODEL(enum CPUSubTypeX86 ST)
@ MH_ALLOW_STACK_EXECUTION
@ MH_SUBSECTIONS_VIA_SYMBOLS
@ MH_NO_REEXPORTED_DYLIBS
@ MH_DEAD_STRIPPABLE_DYLIB
@ DYLD_CHAINED_PTR_START_MULTI
@ DYLD_CHAINED_PTR_START_NONE
@ DYLD_CHAINED_PTR_START_LAST
@ BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB
@ BIND_SUBOPCODE_THREADED_APPLY
static uint8_t GET_COMM_ALIGN(uint16_t n_desc)
@ 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_SET_ADDEND_SLEB
@ BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB
@ BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
@ BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
@ 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_SET_SEGMENT_AND_OFFSET_ULEB
@ CPU_SUBTYPE_MC88000_ALL
@ CPU_SUBTYPE_PENTIUM_3_XEON
@ CPU_SUBTYPE_PENTIUM_3_M
@ CPU_SUBTYPE_PENTIUM_4_M
@ CPU_SUBTYPE_CELERON_MOBILE
@ DYLD_CHAINED_PTR_64_OFFSET
@ 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_ARM64E_KERNEL
@ BIND_SYMBOL_FLAGS_WEAK_IMPORT
@ BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION
@ REFERENCE_FLAG_PRIVATE_DEFINED
@ REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY
@ REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY
@ REFERENCE_FLAG_UNDEFINED_LAZY
@ REFERENCE_FLAG_UNDEFINED_NON_LAZY
static int CPU_SUBTYPE_INTEL(int Family, int Model)
#define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER
@ 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_MC98000_ALL
@ CPU_SUBTYPE_POWERPC_750
@ PPC_RELOC_LO16_SECTDIFF
@ GENERIC_RELOC_PB_LA_PTR
@ ARM64_RELOC_GOT_LOAD_PAGEOFF12
@ ARM64_RELOC_TLVP_LOAD_PAGE21
@ X86_64_RELOC_SUBTRACTOR
@ PPC_RELOC_HA16_SECTDIFF
@ ARM64_RELOC_GOT_LOAD_PAGE21
@ ARM64_RELOC_POINTER_TO_GOT
@ ARM_RELOC_LOCAL_SECTDIFF
@ PPC_RELOC_HI16_SECTDIFF
@ ARM64_RELOC_TLVP_LOAD_PAGEOFF12
@ PPC_RELOC_LO14_SECTDIFF
@ PPC_RELOC_LOCAL_SECTDIFF
@ GENERIC_RELOC_LOCAL_SECTDIFF
@ ARM_RELOC_HALF_SECTDIFF
#define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION
@ CPU_SUBTYPE_MIPS_R2000a
@ CPU_SUBTYPE_MIPS_R3000a
_W64 unsigned int uintptr_t
uint32_t max_valid_pointer
uint32_t objc_module_info_size
uint64_t objc_module_info_addr
uint32_t objc_module_info_addr
uint32_t objc_module_info_size
uint32_t compatibility_version
uint32_t max_valid_pointer
struct x86_exception_state64_t es64
struct x86_state_hdr_t esh
union x86_exception_state_t::@161 ues
struct xmm_reg_t fpu_xmm12
struct xmm_reg_t fpu_xmm11
struct xmm_reg_t fpu_xmm14
struct xmm_reg_t fpu_xmm15
struct mmst_reg_t fpu_stmm2
struct xmm_reg_t fpu_xmm5
struct xmm_reg_t fpu_xmm2
struct mmst_reg_t fpu_stmm0
struct xmm_reg_t fpu_xmm0
struct xmm_reg_t fpu_xmm4
struct mmst_reg_t fpu_stmm6
struct mmst_reg_t fpu_stmm1
struct xmm_reg_t fpu_xmm13
struct mmst_reg_t fpu_stmm7
struct xmm_reg_t fpu_xmm9
struct xmm_reg_t fpu_xmm8
struct xmm_reg_t fpu_xmm1
struct mmst_reg_t fpu_stmm4
struct xmm_reg_t fpu_xmm10
struct xmm_reg_t fpu_xmm6
struct fp_control_t fpu_fcw
struct mmst_reg_t fpu_stmm5
struct fp_status_t fpu_fsw
struct xmm_reg_t fpu_xmm7
struct xmm_reg_t fpu_xmm3
struct mmst_reg_t fpu_stmm3
struct x86_float_state64_t fs64
struct x86_state_hdr_t fsh
union x86_float_state_t::@160 ufs
union x86_thread_state_t::@159 uts
struct x86_thread_state64_t ts64
struct x86_state_hdr_t tsh