14 #ifndef LLVM_SUPPORT_MACHO_H
15 #define LLVM_SUPPORT_MACHO_H
18 #include "llvm/Support/DataTypes.h"
953 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN)
1290 return (((n_desc) >> 8u) & 0xffu);
1294 n_desc = (((n_desc) & 0x00ff) | (((ordinal) & 0xff) << 8));
1298 return (n_desc >> 8u) & 0x0fu;
1302 n_desc = ((n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u));
1366 return Family | (Model << 4);
1369 return ((
int)ST) & 0x0f;
1372 return ((
int)ST) >> 4;
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.
union llvm::MachO::x86_exception_state_t::@181 ues
void swapByteOrder(T &Value)
const uint32_t x86_EXCEPTION_STATE64_COUNT
S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.
void swapStruct(mach_header &mh)
union llvm::MachO::x86_float_state_t::@180 ufs
S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.
union llvm::MachO::x86_thread_state_t::@179 uts
S_LAZY_DYLIB_SYMBOL_POINTERS - Section with lazy symbol pointers to lazy loaded dylibs.
S_4BYTE_LITERALS - Section with 4 byte literals.
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
S_ATTR_EXT_RELOC - Section has external relocation entries.
S_REGULAR - Regular section.
S_INTERPOSING - Section with only pairs of function pointers for interposing.
static void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal)
static uint8_t GET_COMM_ALIGN(uint16_t n_desc)
S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section in files with the MY_DYLDLINK f...
S_LITERAL_POINTERS - Section with pointers to literals.
S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.
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_THREAD_LOCAL_REGULAR - Thread local data section.
S_CSTRING_LITERALS - Section with literal C strings.
S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.
static uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc)
x86_exception_state64_t es64
static int CPU_SUBTYPE_INTEL(int Family, int Model)
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
S_ATTR_NO_DEAD_STRIP - No dead stripping.
S_DTRACE_DOF - Section contains DTrace Object Format.
static void SET_COMM_ALIGN(uint16_t &n_desc, uint8_t align)
const uint32_t x86_FLOAT_STATE64_COUNT
x86_thread_state64_t ts64
S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread local structures.
const uint32_t x86_THREAD_STATE_COUNT
S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local variable initialization pointers to...
S_16BYTE_LITERALS - Section with only 16 byte literals.
const uint32_t x86_EXCEPTION_STATE_COUNT
S_ATTR_LOC_RELOC - Section has local relocation entries.
S_ATTR_DEBUG - A debug section.
S_ATTR_SELF_MODIFYING_CODE - Used with i386 code stubs written on by dyld.
uint32_t objc_module_info_size
static int CPU_SUBTYPE_INTEL_MODEL(CPUSubTypeX86 ST)
static int CPU_SUBTYPE_INTEL_FAMILY(CPUSubTypeX86 ST)
S_COALESCED - Section contains symbols that are to be coalesced.
uint32_t objc_module_info_size
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.
S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be in a ranlib table of contents...
uint32_t compatibility_version