goblin

Module mach

Source
Expand description

The Mach-o, mostly zero-copy, binary format parser and raw struct definitions

Re-exports§

Modules§

  • 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
  • Miscellaneous constants used inside of and when constructing, Mach-o binaries
  • Symbols exported by this binary and available for dynamic linking are encoded in mach-o binaries using a special trie
  • A Mach-o fat binary is a multi-architecture binary container
  • A header contains minimal architecture information, the binary kind, the number of load commands, as well as an endianness hint
  • Dynamically linked symbolic imports
  • 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
  • “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§

  • Iterator over the fat architecture headers in a MultiArch container
  • A cross-platform, zero-copy, endian-aware, 32/64 bit Mach-o binary parser
  • A Mach-o multi architecture (Fat) binary container
  • Iterator over every entry contained in this MultiArch container

Enums§

  • Either a collection of multiple architectures, or a single mach-o binary
  • A single architecture froma multi architecture binary container (MultiArch).

Functions§

  • Parses a magic number, and an accompanying mach-o binary parsing context, according to the magic number.
  • Returns a big endian magical number