Expand description
The Mach-o, mostly zero-copy, binary format parser and raw struct definitions
Re-exports§
pub use self::constants::cputype;
Modules§
- bind_
opcodes - Bind opcodes are interpreted by the dynamic linker to efficiently collect every symbol imported by this binary, and from which library using two-level namespacing
- constants
- Miscellaneous constants used inside of and when constructing, Mach-o binaries
- exports
- Symbols exported by this binary and available for dynamic linking are encoded in mach-o binaries using a special trie
- fat
- A Mach-o fat binary is a multi-architecture binary container
- header
- A header contains minimal architecture information, the binary kind, the number of load commands, as well as an endianness hint
- imports
- Dynamically linked symbolic imports
- load_
command - Load commands tell the kernel and dynamic linker anything from how to load this binary into memory, what the entry point is, apple specific information, to which libraries it requires for dynamic linking
- relocation
- segment
- symbols
- “Nlist” style symbols in this binary - beware, like most symbol tables in most binary formats, they are strippable, and should not be relied upon, see the imports and exports modules for something more permanent.
Structs§
- FatArch
Iterator - Iterator over the fat architecture headers in a
MultiArch
container - MachO
- A cross-platform, zero-copy, endian-aware, 32/64 bit Mach-o binary parser
- Multi
Arch - A Mach-o multi architecture (Fat) binary container
- Single
Arch Iterator - Iterator over every entry contained in this
MultiArch
container
Enums§
- Mach
- Either a collection of multiple architectures, or a single mach-o binary
- Single
Arch - A single architecture froma multi architecture binary container (MultiArch).
Functions§
- parse_
magic_ and_ ctx - Parses a magic number, and an accompanying mach-o binary parsing context, according to the magic number.
- peek
- Returns a big endian magical number
- peek_
bytes