Crate mach_object [−] [src]
Mach-O File Format Parser for Rust
Examples
use std::io::{Read, Cursor}; use std::fs::File; use mach_object::{OFile, CPU_TYPE_X86_64, MachCommand, LoadCommand}; let mut f = File::open("test/helloworld").unwrap(); let mut buf = Vec::new(); let size = f.read_to_end(&mut buf).unwrap(); let mut cur = Cursor::new(&buf[..size]); if let OFile::MachFile { ref header, ref commands } = OFile::parse(&mut cur).unwrap() { assert_eq!(header.cputype, CPU_TYPE_X86_64); assert_eq!(header.ncmds as usize, commands.len()); for &MachCommand(ref cmd, cmdsize) in commands { if let &LoadCommand::Segment64 { ref segname, ref sections, .. } = cmd { println!("segment: {}", segname); for ref sect in sections { println!(" section: {}", sect.sectname); } } } }
For more detail, please check the unit tests and the otool example.
Structs
ArHeader |
the archive file header |
DataInCodeEntry |
The LC_DATA_IN_CODE load commands uses a linkedit_data_command to point to an array of data_in_code_entry entries. |
DyLib |
Dynamically linked shared libraries are identified by two things. |
DyLibModule |
a module table entry |
DyLibTocEntry |
a table of contents entry |
ExportSymbolFlags |
The following are used on the flags byte of a terminal node in the export information. |
FatArch |
For each architecture in the file, specified by a pair of cputype and cpusubtype, the FatArch describes the file offset, file size and alignment in the file of the architecture specific member. |
FatHeader |
The structures of the file format for "fat" architecture specific file (wrapper design). At the begining of the file there is one FatHeader structure followed by a number of FatArch structures. |
FvmLib |
Fixed virtual memory shared libraries are identified by two things. |
LcString |
A variable length string in a load command is represented by an LcString structure. |
LinkEditData |
The linkedit_data_command contains the offsets and sizes of a blob of data in the __LINKEDIT segment. |
MachCommand |
Wrap load command with size in the Mach-O file |
MachHeader |
The mach header appears at the very beginning of the object file |
RanLib |
Structure of the __.SYMDEF table of contents for an archive. |
Section |
A segment is made up of zero or more sections. |
SectionAttributes |
Constants for the section attributes part of the flags field of a section structure. |
SectionFlags |
The flags field of a section structure is separated into two parts a section type and section attributes. |
SegmentFlags |
Constants for the flags field of the segment_command |
SourceVersionTag |
The packed version. |
SymbolIter |
|
VersionTag |
The encoded version. |
Enums
BuildTarget |
The min OS version on which this binary was built to run. |
Error | |
LoadCommand |
The load commands directly follow the mach_header. |
OFile |
The abstract file block, including mach-o file, fat/universal file, archive file and symdef block |
Symbol |
the link-edit 4.3BSD "stab" style symbol |
Constants
ARMAG | |
AR_EFMT1 | |
BIND_IMMEDIATE_MASK | |
BIND_OPCODE_ADD_ADDR_ULEB | |
BIND_OPCODE_DONE | |
BIND_OPCODE_DO_BIND | |
BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED | |
BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB | |
BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB | |
BIND_OPCODE_MASK | |
BIND_OPCODE_SET_ADDEND_SLEB | |
BIND_OPCODE_SET_DYLIB_ORDINAL_IMM | |
BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB | |
BIND_OPCODE_SET_DYLIB_SPECIAL_IMM | |
BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB | |
BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM | |
BIND_OPCODE_SET_TYPE_IMM | |
BIND_SPECIAL_DYLIB_FLAT_LOOKUP | |
BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE | |
BIND_SPECIAL_DYLIB_SELF | |
BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION | |
BIND_SYMBOL_FLAGS_WEAK_IMPORT | |
BIND_TYPE_POINTER | |
BIND_TYPE_TEXT_ABSOLUTE32 | |
BIND_TYPE_TEXT_PCREL32 | |
CPU_ARCH_ABI64 |
64 bit ABI |
CPU_ARCH_MASK |
mask for architecture bits |
CPU_SUBTYPE_386 | |
CPU_SUBTYPE_486 | |
CPU_SUBTYPE_586 | |
CPU_SUBTYPE_486SX | |
CPU_SUBTYPE_ARM64_ALL | |
CPU_SUBTYPE_ARM64_V8 | |
CPU_SUBTYPE_ARM_ALL | |
CPU_SUBTYPE_ARM_V6 | |
CPU_SUBTYPE_ARM_V7 | |
CPU_SUBTYPE_ARM_V8 | |
CPU_SUBTYPE_ARM_V4T | |
CPU_SUBTYPE_ARM_V5TEJ | |
CPU_SUBTYPE_ARM_V6M | |
CPU_SUBTYPE_ARM_V7EM | |
CPU_SUBTYPE_ARM_V7F | |
CPU_SUBTYPE_ARM_V7K | |
CPU_SUBTYPE_ARM_V7M | |
CPU_SUBTYPE_ARM_V7S | |
CPU_SUBTYPE_ARM_XSCALE | |
CPU_SUBTYPE_BIG_ENDIAN | |
CPU_SUBTYPE_CELERON | |
CPU_SUBTYPE_CELERON_MOBILE | |
CPU_SUBTYPE_HPPA_7100 | |
CPU_SUBTYPE_HPPA_7100LC | |
CPU_SUBTYPE_HPPA_ALL | |
CPU_SUBTYPE_I386_ALL | |
CPU_SUBTYPE_I860_860 | |
CPU_SUBTYPE_I860_ALL | |
CPU_SUBTYPE_INTEL_FAMILY_MAX | |
CPU_SUBTYPE_INTEL_MODEL_ALL | |
CPU_SUBTYPE_ITANIUM | |
CPU_SUBTYPE_ITANIUM_2 | |
CPU_SUBTYPE_LIB64 |
64 bit libraries |
CPU_SUBTYPE_LITTLE_ENDIAN | |
CPU_SUBTYPE_MASK |
mask for feature flags |
CPU_SUBTYPE_MC68030 | |
CPU_SUBTYPE_MC68040 | |
CPU_SUBTYPE_MC88100 | |
CPU_SUBTYPE_MC88110 | |
CPU_SUBTYPE_MC98601 | |
CPU_SUBTYPE_MC68030_ONLY | |
CPU_SUBTYPE_MC680X0_ALL | |
CPU_SUBTYPE_MC88000_ALL | |
CPU_SUBTYPE_MC98000_ALL | |
CPU_SUBTYPE_MIPS_ALL | |
CPU_SUBTYPE_MIPS_R2000 | |
CPU_SUBTYPE_MIPS_R2300 | |
CPU_SUBTYPE_MIPS_R2600 | |
CPU_SUBTYPE_MIPS_R2800 | |
CPU_SUBTYPE_MIPS_R3000 | |
CPU_SUBTYPE_MIPS_R2000A | |
CPU_SUBTYPE_MIPS_R3000A | |
CPU_SUBTYPE_MULTIPLE | |
CPU_SUBTYPE_PENT | |
CPU_SUBTYPE_PENTII_M3 | |
CPU_SUBTYPE_PENTII_M5 | |
CPU_SUBTYPE_PENTIUM_3 | |
CPU_SUBTYPE_PENTIUM_4 | |
CPU_SUBTYPE_PENTIUM_3_M | |
CPU_SUBTYPE_PENTIUM_3_XEON | |
CPU_SUBTYPE_PENTIUM_4_M | |
CPU_SUBTYPE_PENTIUM_M | |
CPU_SUBTYPE_PENTPRO | |
CPU_SUBTYPE_POWERPC_601 | |
CPU_SUBTYPE_POWERPC_602 | |
CPU_SUBTYPE_POWERPC_603 | |
CPU_SUBTYPE_POWERPC_604 | |
CPU_SUBTYPE_POWERPC_620 | |
CPU_SUBTYPE_POWERPC_750 | |
CPU_SUBTYPE_POWERPC_970 | |
CPU_SUBTYPE_POWERPC_7400 | |
CPU_SUBTYPE_POWERPC_7450 | |
CPU_SUBTYPE_POWERPC_603E | |
CPU_SUBTYPE_POWERPC_603EV | |
CPU_SUBTYPE_POWERPC_604E | |
CPU_SUBTYPE_POWERPC_ALL | |
CPU_SUBTYPE_SPARC_ALL | |
CPU_SUBTYPE_UVAXI | |
CPU_SUBTYPE_UVAXII | |
CPU_SUBTYPE_UVAXIII | |
CPU_SUBTYPE_VAX730 | |
CPU_SUBTYPE_VAX750 | |
CPU_SUBTYPE_VAX780 | |
CPU_SUBTYPE_VAX785 | |
CPU_SUBTYPE_VAX8200 | |
CPU_SUBTYPE_VAX8500 | |
CPU_SUBTYPE_VAX8600 | |
CPU_SUBTYPE_VAX8650 | |
CPU_SUBTYPE_VAX8800 | |
CPU_SUBTYPE_VAX_ALL | |
CPU_SUBTYPE_X86_64_ALL | |
CPU_SUBTYPE_X86_64_H | |
CPU_SUBTYPE_X86_ALL | |
CPU_SUBTYPE_X86_ARCH1 | |
CPU_SUBTYPE_XEON | |
CPU_SUBTYPE_XEON_MP | |
CPU_TYPE_ALPHA | |
CPU_TYPE_ANY | |
CPU_TYPE_ARM | |
CPU_TYPE_ARM64 | |
CPU_TYPE_HPPA | |
CPU_TYPE_I386 | |
CPU_TYPE_I860 | |
CPU_TYPE_MC88000 | |
CPU_TYPE_MC98000 | |
CPU_TYPE_MC680X0 | |
CPU_TYPE_MIPS | |
CPU_TYPE_POWERPC | |
CPU_TYPE_POWERPC64 | |
CPU_TYPE_SPARC | |
CPU_TYPE_VAX | |
CPU_TYPE_X86 | |
CPU_TYPE_X86_64 | |
DICE_KIND_ABS_JUMP_TABLE32 | |
DICE_KIND_DATA | |
DICE_KIND_JUMP_TABLE8 | |
DICE_KIND_JUMP_TABLE16 | |
DICE_KIND_JUMP_TABLE32 | |
DYNAMIC_LOOKUP_ORDINAL | |
EXECUTABLE_ORDINAL | |
FAT_CIGAM | |
FAT_MAGIC | |
INDIRECT_SYMBOL_ABS | |
INDIRECT_SYMBOL_LOCAL | |
LC_CODE_SIGNATURE |
local of code signature |
LC_DATA_IN_CODE |
table of non-instructions in __text |
LC_DYLD_ENVIRONMENT |
string for dyld to treat like environment variable |
LC_DYLD_INFO |
compressed dyld information |
LC_DYLD_INFO_ONLY |
compressed dyld information only |
LC_DYLIB_CODE_SIGN_DRS |
Code signing DRs copied from linked dylibs |
LC_DYSYMTAB |
dynamic link-edit symbol table info |
LC_ENCRYPTION_INFO |
encrypted segment information |
LC_ENCRYPTION_INFO_64 |
64-bit encrypted segment information |
LC_FUNCTION_STARTS |
compressed table of function start addresses |
LC_FVMFILE |
fixed VM file inclusion (internal use) |
LC_IDENT |
object identification info (obsolete) |
LC_IDFVMLIB |
fixed VM shared library identification |
LC_ID_DYLIB |
dynamically linked shared lib ident |
LC_ID_DYLINKER |
dynamic linker identification |
LC_LAZY_LOAD_DYLIB |
delay load of dylib until first use |
LC_LINKER_OPTIMIZATION_HINT |
optimization hints in MH_OBJECT files |
LC_LINKER_OPTION |
linker options in MH_OBJECT files |
LC_LOADFVMLIB |
load a specified fixed VM shared library |
LC_LOAD_DYLIB |
load a dynamically linked shared library |
LC_LOAD_DYLINKER |
load a dynamic linker |
LC_LOAD_UPWARD_DYLIB |
load upward dylib |
LC_LOAD_WEAK_DYLIB | |
LC_MAIN |
replacement for LC_UNIXTHREAD |
LC_PREBIND_CKSUM |
prebind checksum |
LC_PREBOUND_DYLIB |
modules prebound for a dynamically |
LC_PREPAGE |
prepage command (internal use) |
LC_REEXPORT_DYLIB |
load and re-export dylib |
LC_REQ_DYLD | |
LC_ROUTINES | |
LC_ROUTINES_64 |
64-bit image routines |
LC_RPATH |
runpath additions |
LC_SEGMENT | |
LC_SEGMENT_64 |
64-bit segment of this file to be mapped |
LC_SEGMENT_SPLIT_INFO |
local of info to split segments |
LC_SOURCE_VERSION |
source version used to build binary |
LC_SUB_CLIENT |
sub client |
LC_SUB_FRAMEWORK |
sub framework |
LC_SUB_LIBRARY |
sub library |
LC_SUB_UMBRELLA |
sub umbrella |
LC_SYMSEG |
link-edit gdb symbol table info (obsolete) |
LC_SYMTAB |
link-edit stab symbol table info |
LC_THREAD |
thread |
LC_TWOLEVEL_HINTS |
two-level namespace lookup hints |
LC_UNIXTHREAD |
unix thread (includes a stack) |
LC_UUID |
the uuid |
LC_VERSION_MIN_IPHONEOS |
build for iPhoneOS min OS version |
LC_VERSION_MIN_MACOSX |
build for MacOSX min OS version |
LC_VERSION_MIN_TVOS |
build for AppleTV min OS version |
LC_VERSION_MIN_WATCHOS |
build for Watch min OS version |
MAX_LIBRARY_ORDINAL | |
MH_ALLMODSBOUND |
indicates that this binary binds to all two-level namespace modules of its dependent libraries. only used when MH_PREBINDABLE and MH_TWOLEVEL are both set. |
MH_ALLOW_STACK_EXECUTION |
When this bit is set, all stacks in the task will be given stack execution privilege. Only used in MH_EXECUTE filetypes. |
MH_APP_EXTENSION_SAFE |
The code was linked for use in an application extension. |
MH_BINDATLOAD | |
MH_BINDS_TO_WEAK |
the final linked image uses weak symbols |
MH_BUNDLE |
dynamically bound bundle file |
MH_CANONICAL |
the binary has been canonicalized via the unprebind operation |
MH_CIGAM |
NXSwapInt(MH_MAGIC) |
MH_CIGAM_64 |
NXSwapInt(MH_MAGIC_64) |
MH_CORE |
core file |
MH_DEAD_STRIPPABLE_DYLIB |
Only for use on dylibs. When linking against a dylib that has this bit set, the static linker will automatically not create a LC_LOAD_DYLIB load command to the dylib if no symbols are being referenced from the dylib. |
MH_DSYM |
companion file with only debug sections |
MH_DYLDLINK | |
MH_DYLIB |
dynamically bound shared library |
MH_DYLIB_STUB |
shared library stub for static linking only, no section contents |
MH_DYLINKER |
dynamic link editor |
MH_EXECUTE |
demand paged executable file |
MH_FORCE_FLAT |
the executable is forcing all images to use flat name space bindings |
MH_FVMLIB |
fixed VM shared library file |
MH_HAS_TLV_DESCRIPTORS |
Contains a section of type S_THREAD_LOCAL_VARIABLES |
MH_INCRLINK |
the object file is the output of an incremental link against a base file and can't be link edited again |
MH_KEXT_BUNDLE |
x86_64 kexts |
MH_LAZY_INIT |
the shared library init routine is to be run lazily via catching memory faults to its writeable segments (obsolete) |
MH_MAGIC |
the mach magic number |
MH_MAGIC_64 |
the 64-bit mach magic number |
MH_NOFIXPREBINDING |
do not have dyld notify the prebinding agent about this executable |
MH_NOMULTIDEFS |
this umbrella guarantees no multiple defintions of symbols in its sub-images so the two-level namespace hints can always be used. |
MH_NOUNDEFS |
the object file has no undefined references |
MH_NO_HEAP_EXECUTION |
When this bit is set, the OS will run the main executable with a non-executable heap even on platforms (e.g. i386) that don't require it. Only used in MH_EXECUTE filetypes. |
MH_NO_REEXPORTED_DYLIBS |
When this bit is set on a dylib, the static linker does not need to examine dependent dylibs to see if any are re-exported |
MH_OBJECT |
relocatable object file |
MH_PIE |
When this bit is set, the OS will load the main executable at a random address. Only used in MH_EXECUTE filetypes. |
MH_PREBINDABLE |
the binary is not prebound but can have its prebinding redone. only used when MH_PREBOUND is not set. |
MH_PREBOUND |
the file has its dynamic undefined references prebound. |
MH_PRELOAD |
preloaded executable file |
MH_ROOT_SAFE |
When this bit is set, the binary declares it is safe for use in processes with uid zero |
MH_SETUID_SAFE |
When this bit is set, the binary declares it is safe for use in processes when issetugid() is true |
MH_SPLIT_SEGS |
the file has its read-only and read-write segments split |
MH_SUBSECTIONS_VIA_SYMBOLS |
safe to divide up the sections into sub-sections via symbols for dead code stripping |
MH_TWOLEVEL |
the image is using two-level name space bindings |
MH_WEAK_DEFINES |
the final linked image contains external weak symbols |
N_ALT_ENTRY |
The N_ALT_ENTRY bit of the n_desc field indicates that the symbol is pinned to the previous content. |
N_ARM_THUMB_DEF |
The N_ARM_THUMB_DEF bit of the n_desc field indicates that the symbol is a defintion of a Thumb function. |
N_AST |
AST file path: name,,NO_SECT,0,0 |
N_BCOMM |
begin common: name,,NO_SECT,0,0 |
N_BINCL |
include file beginning: name,,NO_SECT,0,sum |
N_BNSYM |
begin nsect sym: 0,,n_sect,0,address |
N_DESC_DISCARDED |
The N_DESC_DISCARDED bit of the n_desc field never appears in linked image. But is used in very rare cases by the dynamic link editor to mark an in memory symbol as discared and longer used for linking. |
N_ECOML |
end common (local name): 0,,n_sect,0,address |
N_ECOMM |
end common: name,,n_sect,0,0 |
N_EINCL |
include file end: name,,NO_SECT,0,0 |
N_ENSYM |
end nsect sym: 0,,n_sect,0,address |
N_ENTRY |
alternate entry: name,,n_sect,linenumber,address |
N_EXCL |
deleted include file: name,,NO_SECT,0,sum |
N_FNAME |
procedure name (f77 kludge): name,,NO_SECT,0,0 |
N_FUN |
procedure: name,,n_sect,linenumber,address |
N_GSYM |
global symbol: name,,NO_SECT,type,0 |
N_LBRAC |
left bracket: 0,,NO_SECT,nesting level,address |
N_LCSYM |
.lcomm symbol: name,,n_sect,type,address |
N_LENG |
second stab entry with length information |
N_LSYM |
local sym: name,,NO_SECT,type,offset |
N_NO_DEAD_STRIP |
The N_NO_DEAD_STRIP bit of the n_desc field only ever appears in a relocatable .o file (MH_OBJECT filetype). And is used to indicate to the static link editor it is never to dead strip the symbol. |
N_OLEVEL |
compiler -O level: name,,NO_SECT,0,0 |
N_OPT |
emitted with gcc2_compiled and in gcc source |
N_OSO |
object file name: name,,0,0,st_mtime |
N_PARAMS |
compiler parameters: name,,NO_SECT,0,0 |
N_PC |
global pascal symbol: name,,NO_SECT,subtype,line |
N_PSYM |
parameter: name,,NO_SECT,type,offset |
N_RBRAC |
right bracket: 0,,NO_SECT,nesting level,address |
N_REF_TO_WEAK |
The N_REF_TO_WEAK bit of the n_desc field indicates to the dynamic linker that the undefined symbol should be resolved using flat namespace searching. |
N_RSYM |
register sym: name,,NO_SECT,type,register |
N_SLINE |
src line: 0,,n_sect,linenumber,address |
N_SO |
source file name: name,,n_sect,0,address |
N_SOL | |
N_SSYM |
structure elt: name,,NO_SECT,type,struct_offset |
N_STSYM |
static symbol: name,,n_sect,type,address |
N_SYMBOL_RESOLVER |
The N_SYMBOL_RESOLVER bit of the n_desc field indicates that the that the function is actually a resolver function and should be called to get the address of the real function to use. This bit is only available in .o files (MH_OBJECT filetype) |
N_VERSION |
compiler version: name,,NO_SECT,0,0 |
N_WEAK_DEF |
The N_WEAK_DEF bit of the n_desc field indicates to the static and dynamic linkers that the symbol definition is weak, allowing a non-weak symbol to also be used which causes the weak definition to be discared. Currently this is only supported for symbols in coalesed sections. |
N_WEAK_REF |
The N_WEAK_REF bit of the n_desc field indicates to the dynamic linker that the undefined symbol is allowed to be missing and is to have the address of zero when missing. |
REBASE_IMMEDIATE_MASK | |
REBASE_OPCODE_ADD_ADDR_IMM_SCALED | |
REBASE_OPCODE_ADD_ADDR_ULEB | |
REBASE_OPCODE_DONE | |
REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB | |
REBASE_OPCODE_DO_REBASE_IMM_TIMES | |
REBASE_OPCODE_DO_REBASE_ULEB_TIMES | |
REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB | |
REBASE_OPCODE_MASK | |
REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB | |
REBASE_OPCODE_SET_TYPE_IMM | |
REBASE_TYPE_POINTER | |
REBASE_TYPE_TEXT_ABSOLUTE32 | |
REBASE_TYPE_TEXT_PCREL32 | |
REFERENCED_DYNAMICALLY |
To simplify stripping of objects that use are used with the dynamic link editor, the static link editor marks the symbols defined an object that are referenced by a dynamicly bound object (dynamic shared libraries, bundles). With this marking strip knows not to strip these symbols. |
REFERENCE_FLAG_DEFINED | |
REFERENCE_FLAG_PRIVATE_DEFINED | |
REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY | |
REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY | |
REFERENCE_FLAG_UNDEFINED_LAZY | |
REFERENCE_FLAG_UNDEFINED_NON_LAZY | |
REFERENCE_TYPE |
To support the lazy binding of undefined symbols in the dynamic link-editor, the undefined symbols in the symbol table (the nlist structures) are marked with the indication if the undefined reference is a lazy reference or non-lazy reference. If both a non-lazy reference and a lazy reference is made to the same symbol the non-lazy reference takes precedence. A reference is lazy only when all references to that symbol are made through a symbol pointer in a lazy symbol pointer section. |
SECTION_ATTRIBUTES | |
SECTION_TYPE | |
SELF_LIBRARY_ORDINAL | |
SYMDEF | |
SYMDEF_SORTED | |
S_16BYTE_LITERALS |
section with only 16 byte literals |
S_4BYTE_LITERALS |
section with only 4 byte literals |
S_8BYTE_LITERALS |
section with only 8 byte literals |
S_COALESCED |
section contains symbols that are to be coalesced |
S_CSTRING_LITERALS |
section with only literal C strings |
S_DTRACE_DOF |
section contains DTrace Object Format |
S_GB_ZEROFILL |
zero fill on demand section that can be larger than 4 gigabytes) |
S_INTERPOSING |
section with only pairs of function pointers for interposing |
S_LAZY_DYLIB_SYMBOL_POINTERS |
section with only lazy symbol pointers to lazy loaded dylibs |
S_LAZY_SYMBOL_POINTERS |
section with only lazy symbol pointers |
S_LITERAL_POINTERS |
section with only pointers to literals |
S_MOD_INIT_FUNC_POINTERS |
section with only function pointers for initialization |
S_MOD_TERM_FUNC_POINTERS |
section with only function pointers for termination |
S_NON_LAZY_SYMBOL_POINTERS |
section with only non-lazy symbol pointers |
S_REGULAR |
regular section |
S_SYMBOL_STUBS |
section with only symbol stubs, byte size of stub in the reserved2 field |
S_THREAD_LOCAL_INIT_FUNCTION_POINTERS |
functions to call to initialize TLV values |
S_THREAD_LOCAL_REGULAR |
template of initial values for TLVs |
S_THREAD_LOCAL_VARIABLES |
TLV descriptors |
S_THREAD_LOCAL_VARIABLE_POINTERS |
pointers to TLV descriptors |
S_THREAD_LOCAL_ZEROFILL |
template of initial values for TLVs |
S_ZEROFILL |
zero fill on demand section |
Statics
SECT_BSS |
the real uninitialized data section no padding |
SECT_COMMON |
the section common symbols are allocated in by the link editor |
SECT_DATA |
the real initialized data section no padding, no bss overlap |
SECT_FVMLIB_INIT0 |
the fvmlib initialization section |
SECT_FVMLIB_INIT1 |
the section following the fvmlib initialization section |
SECT_ICON_HEADER |
the icon headers |
SECT_ICON_TIFF |
the icons in tiff format |
SECT_OBJC_MODULES |
module information |
SECT_OBJC_REFS |
string table |
SECT_OBJC_STRINGS |
string table |
SECT_OBJC_SYMBOLS |
symbol table |
SECT_TEXT |
the real text part of the text |
SEG_DATA |
the tradition UNIX data segment |
SEG_ICON |
the icon segment |
SEG_IMPORT |
the segment for the self (dyld) modifing code stubs that has read, write and execute permissions |
SEG_LINKEDIT |
the segment containing all structs created and maintained by the link editor. Created with -seglinkedit option to ld(1) for MH_EXECUTE and FVMLIB file types only |
SEG_OBJC |
objective-C runtime segment |
SEG_PAGEZERO |
the pagezero segment which has no protections and catches NULL references for MH_EXECUTE files |
SEG_TEXT |
the tradition UNIX text segment |
SEG_UNIXSTACK |
the unix stack segment |
Traits
ReadStringExt |
Read a fixed size string |
SymbolReader |
Read symbols from a Mach-O file |
SymbolReference |
Reference type and flags of symbol |
Functions
get_arch_from_flag | |
get_arch_name_from_types | |
get_cpu_subtype_feature | |
get_cpu_subtype_type |
Type Definitions
cpu_subtype_t | |
cpu_type_t | |
off_t | |
vm_prot_t |