Struct goblin::mach::MachO []

pub struct MachO<'a> {
    pub header: Header,
    pub load_commands: Vec<LoadCommand>,
    pub segments: Segments<'a>,
    pub symbols: Option<Symbols<'a>>,
    pub libs: Vec<&'a str>,
    pub entry: u64,
    pub old_style_entry: bool,
    pub name: Option<&'a str>,
    pub little_endian: bool,
    pub is_64: bool,
    // some fields omitted
}

A cross-platform, zero-copy, endian-aware, 32/64 bit Mach-o binary parser

Fields

The mach-o header

The load commands tell the kernel and dynamic linker how to use/interpret this binary

The load command "segments" - typically the pieces of the binary that are loaded into memory

The "Nlist" style symbols in this binary - strippable

The dylibs this library depends on

The entry point (as a virtual memory address), 0 if none

Whether entry refers to an older LC_UNIXTHREAD instead of the newer LC_MAIN entrypoint

The name of the dylib, if any

Are we a little-endian binary?

Are we a 64-bit binary

Methods

impl<'a> MachO<'a>

Return the exported symbols in this binary (if any)

Return the imported symbols in this binary that dyld knows about (if any)

Parses the Mach-o binary from bytes at offset

Trait Implementations

impl<'a> Debug for MachO<'a>

Formats the value using the given formatter.