pub struct MachOFile<'data, Mach, R = &'data [u8]> where
Mach: MachHeader,
R: ReadRef<'data>, { /* private fields */ }
Expand description
A partially parsed Mach-O file.
Most of the functionality of this type is provided by the Object
trait implementation.
Implementations
Trait Implementations
impl<'data, 'file, Mach, R> Object<'data, 'file> for MachOFile<'data, Mach, R> where
'data: 'file,
Mach: MachHeader,
R: 'file + ReadRef<'data>,
impl<'data, 'file, Mach, R> Object<'data, 'file> for MachOFile<'data, Mach, R> where
'data: 'file,
Mach: MachHeader,
R: 'file + ReadRef<'data>,
type Segment = MachOSegment<'data, 'file, Mach, R>
type Segment = MachOSegment<'data, 'file, Mach, R>
A segment in the object file.
type SegmentIterator = MachOSegmentIterator<'data, 'file, Mach, R>
type SegmentIterator = MachOSegmentIterator<'data, 'file, Mach, R>
An iterator over the segments in the object file.
type Section = MachOSection<'data, 'file, Mach, R>
type Section = MachOSection<'data, 'file, Mach, R>
A section in the object file.
type SectionIterator = MachOSectionIterator<'data, 'file, Mach, R>
type SectionIterator = MachOSectionIterator<'data, 'file, Mach, R>
An iterator over the sections in the object file.
type Comdat = MachOComdat<'data, 'file, Mach, R>
type Comdat = MachOComdat<'data, 'file, Mach, R>
A COMDAT section group in the object file.
type ComdatIterator = MachOComdatIterator<'data, 'file, Mach, R>
type ComdatIterator = MachOComdatIterator<'data, 'file, Mach, R>
An iterator over the COMDAT section groups in the object file.
type Symbol = MachOSymbol<'data, 'file, Mach, R>
type Symbol = MachOSymbol<'data, 'file, Mach, R>
A symbol in the object file.
type SymbolIterator = MachOSymbolIterator<'data, 'file, Mach, R>
type SymbolIterator = MachOSymbolIterator<'data, 'file, Mach, R>
An iterator over symbols in the object file.
type SymbolTable = MachOSymbolTable<'data, 'file, Mach, R>
type SymbolTable = MachOSymbolTable<'data, 'file, Mach, R>
A symbol table in the object file.
An iterator over dynamic relocations in the file. Read more
Get the architecture type of the file.
Return true if the file is little endian, false if it is big endian.
Return the kind of this object.
fn segments(&'file self) -> MachOSegmentIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOSegmentIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOSegmentIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSegment<'data, 'file, Mach, R>;
fn segments(&'file self) -> MachOSegmentIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOSegmentIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOSegmentIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSegment<'data, 'file, Mach, R>;
impl<'data, 'file, Mach, R> Iterator for MachOSegmentIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSegment<'data, 'file, Mach, R>;
Get an iterator over the segments in the file.
fn section_by_name_bytes(
&'file self,
section_name: &[u8]
) -> Option<MachOSection<'data, 'file, Mach, R>>
fn section_by_name_bytes(
&'file self,
section_name: &[u8]
) -> Option<MachOSection<'data, 'file, Mach, R>>
Like Self::section_by_name
, but allows names that are not UTF-8.
fn section_by_index(
&'file self,
index: SectionIndex
) -> Result<MachOSection<'data, 'file, Mach, R>>
fn section_by_index(
&'file self,
index: SectionIndex
) -> Result<MachOSection<'data, 'file, Mach, R>>
Get the section at the given index. Read more
fn sections(&'file self) -> MachOSectionIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOSectionIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOSectionIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSection<'data, 'file, Mach, R>;
fn sections(&'file self) -> MachOSectionIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOSectionIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOSectionIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSection<'data, 'file, Mach, R>;
impl<'data, 'file, Mach, R> Iterator for MachOSectionIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSection<'data, 'file, Mach, R>;
Get an iterator over the sections in the file.
fn comdats(&'file self) -> MachOComdatIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOComdatIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOComdatIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOComdat<'data, 'file, Mach, R>;
fn comdats(&'file self) -> MachOComdatIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOComdatIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOComdatIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOComdat<'data, 'file, Mach, R>;
impl<'data, 'file, Mach, R> Iterator for MachOComdatIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOComdat<'data, 'file, Mach, R>;
Get an iterator over the COMDAT section groups in the file.
fn symbol_by_index(
&'file self,
index: SymbolIndex
) -> Result<MachOSymbol<'data, 'file, Mach, R>>
fn symbol_by_index(
&'file self,
index: SymbolIndex
) -> Result<MachOSymbol<'data, 'file, Mach, R>>
Get the debugging symbol at the given index. Read more
fn symbols(&'file self) -> MachOSymbolIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOSymbolIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOSymbolIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSymbol<'data, 'file, Mach, R>;
fn symbols(&'file self) -> MachOSymbolIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOSymbolIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOSymbolIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSymbol<'data, 'file, Mach, R>;
impl<'data, 'file, Mach, R> Iterator for MachOSymbolIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSymbol<'data, 'file, Mach, R>;
Get an iterator over the debugging symbols in the file. Read more
Get the symbol table, if any.
fn dynamic_symbols(&'file self) -> MachOSymbolIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOSymbolIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOSymbolIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSymbol<'data, 'file, Mach, R>;
fn dynamic_symbols(&'file self) -> MachOSymbolIterator<'data, 'file, Mach, R>ⓘNotable traits for MachOSymbolIterator<'data, 'file, Mach, R>impl<'data, 'file, Mach, R> Iterator for MachOSymbolIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSymbol<'data, 'file, Mach, R>;
impl<'data, 'file, Mach, R> Iterator for MachOSymbolIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = MachOSymbol<'data, 'file, Mach, R>;
Get an iterator over the dynamic linking symbols in the file. Read more
Get the dynamic linking symbol table, if any. Read more
Construct a map from addresses to symbol names and object file names. Read more
Get the exported symbols that expose both a name and an address. Read more
Get the dynamic relocations for this file. Read more
Return true if the file contains debug information sections, false if not.
Get the base address used for relative virtual addresses. Read more
Get the endianness of the file.
Get the section named section_name
, if such a section exists. Read more
Construct a map from addresses to symbol names. Read more
The build ID from an ELF NT_GNU_BUILD_ID
note.
The filename and CRC from a .gnu_debuglink
section.
The filename and build ID from a .gnu_debugaltlink
section.