Struct goblin::mach::MachO[][src]

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>
[src]

Is this a relocatable object file?

Important traits for SymbolIterator<'a>

Return an iterator over all the symbols in this binary

Return a vector of the relocations in this binary

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>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for MachO<'a>

impl<'a> Sync for MachO<'a>