14 #ifndef LLVM_BINARYFORMAT_MACHO_H 15 #define LLVM_BINARYFORMAT_MACHO_H 90 #define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) LCName = LCValue, 93 #include "llvm/BinaryFormat/MachO.def" 96 #undef HANDLE_LOAD_COMMAND 945 uint32_t r_symbolnum : 24, r_pcrel : 1, r_length : 2, r_extern : 1,
950 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN) 951 uint32_t r_scattered : 1, r_pcrel : 1, r_length : 2, r_type : 4,
1380 return (((n_desc) >> 8u) & 0xffu);
1384 n_desc = (((n_desc)&0x00ff) | (((ordinal)&0xff) << 8));
1388 return (n_desc >> 8u) & 0x0fu;
1392 n_desc = ((n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u));
1456 return Family | (Model << 4);
1459 return ((
int)ST) & 0x0f;
1560 unsigned short invalid : 1, denorm : 1,
zdiv : 1, ovrfl : 1, undfl : 1,
1561 precis : 1, : 2, pc : 2,
rc : 2, : 1, : 3;
1565 unsigned short invalid : 1, denorm : 1,
zdiv : 1, ovrfl : 1, undfl : 1,
1566 precis : 1, stkflt : 1, errsumm : 1, c0 : 1, c1 : 1, c2 : 1, tos : 3,
1580 int32_t fpu_reserved[2];
1618 char fpu_rsrv4[6 * 16];
1787 for (
int i = 0; i < 13; i++)
1806 for (
int i = 0; i < 29; i++)
1977 #define LOAD_COMMAND_STRUCT(LCStruct) LCStruct LCStruct##_data; 1981 #include "llvm/BinaryFormat/MachO.def"
union llvm::MachO::arm_thread_state_t::@128 uts
void swapStruct(fat_header &mh)
S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
const uint32_t x86_FLOAT_STATE_COUNT
S_SYMBOL_STUBS - Section with symbol stubs, byte size of stub in the Reserved2 field.
void swapByteOrder(T &Value)
const uint32_t x86_EXCEPTION_STATE64_COUNT
This class represents lattice values for constants.
int CPU_SUBTYPE_INTEL(int Family, int Model)
union llvm::MachO::x86_exception_state_t::@127 ues
#define LLVM_PACKED_START
S_ATTR_SELF_MODIFYING_CODE - Used with i386 code stubs written on by dyld.
S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.
uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc)
S_ATTR_NO_DEAD_STRIP - No dead stripping.
uint8_t GET_COMM_ALIGN(uint16_t n_desc)
void SET_COMM_ALIGN(uint16_t &n_desc, uint8_t align)
void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal)
S_LAZY_DYLIB_SYMBOL_POINTERS - Section with lazy symbol pointers to lazy loaded dylibs.
const uint32_t ARM_THREAD_STATE_COUNT
S_4BYTE_LITERALS - Section with 4 byte literals.
const uint32_t x86_THREAD_STATE32_COUNT
S_8BYTE_LITERALS - Section with 8 byte literals.
S_MOD_TERM_FUNC_POINTERS - Section with only function pointers for termination.
uint32_t objc_module_info_addr
union llvm::MachO::x86_float_state_t::@126 ufs
ppc_thread_state32_t ts32
S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.
S_ATTR_EXT_RELOC - Section has external relocation entries.
S_REGULAR - Regular section.
S_INTERPOSING - Section with only pairs of function pointers for interposing.
S_LITERAL_POINTERS - Section with pointers to literals.
S_GB_ZEROFILL - Zero fill on demand section (that can be larger than 4 gigabytes).
S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.
const uint32_t x86_THREAD_STATE64_COUNT
uint64_t objc_module_info_addr
S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.
S_THREAD_LOCAL_REGULAR - Thread local data section.
S_CSTRING_LITERALS - Section with literal C strings.
x86_exception_state64_t es64
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
S_DTRACE_DOF - Section contains DTrace Object Format.
const uint32_t x86_FLOAT_STATE64_COUNT
x86_thread_state64_t ts64
S_ATTR_LOC_RELOC - Section has local relocation entries.
S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread local structures.
const uint32_t x86_THREAD_STATE_COUNT
union llvm::MachO::ppc_thread_state_t::@129 uts
S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local variable initialization pointers to...
S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be in a ranlib table of contents...
int CPU_SUBTYPE_INTEL_FAMILY(CPUSubTypeX86 ST)
S_16BYTE_LITERALS - Section with only 16 byte literals.
const uint32_t x86_EXCEPTION_STATE_COUNT
S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.
x86_thread_state32_t ts32
S_ATTR_DEBUG - A debug section.
uint32_t objc_module_info_size
S_COALESCED - Section contains symbols that are to be coalesced.
uint32_t objc_module_info_size
union llvm::MachO::x86_thread_state_t::@125 uts
const uint32_t ARM_THREAD_STATE64_COUNT
S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section in files with the MY_DYLDLINK f...
S_ZEROFILL - Zero fill on demand section.
S_MOD_INIT_FUNC_POINTERS - Section with only function pointers for initialization.
SectionType
These are the section type and attributes fields.
uint32_t compatibility_version
const uint32_t PPC_THREAD_STATE_COUNT
int CPU_SUBTYPE_INTEL_MODEL(CPUSubTypeX86 ST)
arm_thread_state32_t ts32