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 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
header: Header
The mach-o header
load_commands: Vec<LoadCommand>
The load commands tell the kernel and dynamic linker how to use/interpret this binary
segments: Segments<'a>
The load command "segments" - typically the pieces of the binary that are loaded into memory
symbols: Option<Symbols<'a>>
The "Nlist" style symbols in this binary - strippable
libs: Vec<&'a str>
The dylibs this library depends on
entry: u64
The entry point, 0 if none
name: Option<&'a str>
The name of the dylib, if any
little_endian: bool
Are we a little-endian binary?
is_64: bool
Are we a 64-bit binary
Methods
impl<'a> MachO<'a>
[src]
fn exports(&self) -> Result<Vec<Export>>
Return the exported symbols in this binary (if any)
fn imports(&self) -> Result<Vec<Import>>
Return the imported symbols in this binary that dyld knows about (if any)
fn parse(bytes: &'a [u8], offset: usize) -> Result<MachO<'a>>
Parses the Mach-o binary from bytes
at offset