pub struct MachOFile<'data, Mach: MachHeader> { /* 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
sourceimpl<'data, Mach: MachHeader> MachOFile<'data, Mach>
impl<'data, Mach: MachHeader> MachOFile<'data, Mach>
Trait Implementations
sourceimpl<'data, Mach: Debug + MachHeader> Debug for MachOFile<'data, Mach> where
Mach::Endian: Debug,
impl<'data, Mach: Debug + MachHeader> Debug for MachOFile<'data, Mach> where
Mach::Endian: Debug,
sourceimpl<'data, 'file, Mach> Object<'data, 'file> for MachOFile<'data, Mach> where
'data: 'file,
Mach: MachHeader,
impl<'data, 'file, Mach> Object<'data, 'file> for MachOFile<'data, Mach> where
'data: 'file,
Mach: MachHeader,
type Segment = MachOSegment<'data, 'file, Mach>
type Segment = MachOSegment<'data, 'file, Mach>
A segment in the object file.
type SegmentIterator = MachOSegmentIterator<'data, 'file, Mach>
type SegmentIterator = MachOSegmentIterator<'data, 'file, Mach>
An iterator over the segments in the object file.
type Section = MachOSection<'data, 'file, Mach>
type Section = MachOSection<'data, 'file, Mach>
A section in the object file.
type SectionIterator = MachOSectionIterator<'data, 'file, Mach>
type SectionIterator = MachOSectionIterator<'data, 'file, Mach>
An iterator over the sections in the object file.
type Comdat = MachOComdat<'data, 'file, Mach>
type Comdat = MachOComdat<'data, 'file, Mach>
A COMDAT section group in the object file.
type ComdatIterator = MachOComdatIterator<'data, 'file, Mach>
type ComdatIterator = MachOComdatIterator<'data, 'file, Mach>
An iterator over the COMDAT section groups in the object file.
type Symbol = MachOSymbol<'data, 'file, Mach>
type Symbol = MachOSymbol<'data, 'file, Mach>
A symbol in the object file.
type SymbolIterator = MachOSymbolIterator<'data, 'file, Mach>
type SymbolIterator = MachOSymbolIterator<'data, 'file, Mach>
An iterator over symbols in the object file.
type SymbolTable = MachOSymbolTable<'data, 'file, Mach>
type SymbolTable = MachOSymbolTable<'data, 'file, Mach>
A symbol table in the object file.
type DynamicRelocationIterator = NoDynamicRelocationIterator
type DynamicRelocationIterator = NoDynamicRelocationIterator
An iterator over dynamic relocations in the file. Read more
sourcefn architecture(&self) -> Architecture
fn architecture(&self) -> Architecture
Get the architecture type of the file.
sourcefn is_little_endian(&self) -> bool
fn is_little_endian(&self) -> bool
Return true if the file is little endian, false if it is big endian.
sourcefn segments(&'file self) -> MachOSegmentIterator<'data, 'file, Mach>ⓘNotable traits for MachOSegmentIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOSegmentIterator<'data, 'file, Mach> type Item = MachOSegment<'data, 'file, Mach>;
fn segments(&'file self) -> MachOSegmentIterator<'data, 'file, Mach>ⓘNotable traits for MachOSegmentIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOSegmentIterator<'data, 'file, Mach> type Item = MachOSegment<'data, 'file, Mach>;
Get an iterator over the segments in the file.
sourcefn section_by_name(
&'file self,
section_name: &str
) -> Option<MachOSection<'data, 'file, Mach>>
fn section_by_name(
&'file self,
section_name: &str
) -> Option<MachOSection<'data, 'file, Mach>>
Get the section named section_name
, if such a section exists. Read more
sourcefn section_by_index(
&'file self,
index: SectionIndex
) -> Result<MachOSection<'data, 'file, Mach>>
fn section_by_index(
&'file self,
index: SectionIndex
) -> Result<MachOSection<'data, 'file, Mach>>
Get the section at the given index. Read more
sourcefn sections(&'file self) -> MachOSectionIterator<'data, 'file, Mach>ⓘNotable traits for MachOSectionIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOSectionIterator<'data, 'file, Mach> type Item = MachOSection<'data, 'file, Mach>;
fn sections(&'file self) -> MachOSectionIterator<'data, 'file, Mach>ⓘNotable traits for MachOSectionIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOSectionIterator<'data, 'file, Mach> type Item = MachOSection<'data, 'file, Mach>;
Get an iterator over the sections in the file.
sourcefn comdats(&'file self) -> MachOComdatIterator<'data, 'file, Mach>ⓘNotable traits for MachOComdatIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOComdatIterator<'data, 'file, Mach> type Item = MachOComdat<'data, 'file, Mach>;
fn comdats(&'file self) -> MachOComdatIterator<'data, 'file, Mach>ⓘNotable traits for MachOComdatIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOComdatIterator<'data, 'file, Mach> type Item = MachOComdat<'data, 'file, Mach>;
Get an iterator over the COMDAT section groups in the file.
sourcefn symbol_by_index(
&'file self,
index: SymbolIndex
) -> Result<MachOSymbol<'data, 'file, Mach>>
fn symbol_by_index(
&'file self,
index: SymbolIndex
) -> Result<MachOSymbol<'data, 'file, Mach>>
Get the debugging symbol at the given index. Read more
sourcefn symbols(&'file self) -> MachOSymbolIterator<'data, 'file, Mach>ⓘNotable traits for MachOSymbolIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOSymbolIterator<'data, 'file, Mach> type Item = MachOSymbol<'data, 'file, Mach>;
fn symbols(&'file self) -> MachOSymbolIterator<'data, 'file, Mach>ⓘNotable traits for MachOSymbolIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOSymbolIterator<'data, 'file, Mach> type Item = MachOSymbol<'data, 'file, Mach>;
Get an iterator over the debugging symbols in the file. Read more
sourcefn symbol_table(&'file self) -> Option<MachOSymbolTable<'data, 'file, Mach>>
fn symbol_table(&'file self) -> Option<MachOSymbolTable<'data, 'file, Mach>>
Get the symbol table, if any.
sourcefn dynamic_symbols(&'file self) -> MachOSymbolIterator<'data, 'file, Mach>ⓘNotable traits for MachOSymbolIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOSymbolIterator<'data, 'file, Mach> type Item = MachOSymbol<'data, 'file, Mach>;
fn dynamic_symbols(&'file self) -> MachOSymbolIterator<'data, 'file, Mach>ⓘNotable traits for MachOSymbolIterator<'data, 'file, Mach>impl<'data, 'file, Mach: MachHeader> Iterator for MachOSymbolIterator<'data, 'file, Mach> type Item = MachOSymbol<'data, 'file, Mach>;
Get an iterator over the dynamic linking symbols in the file. Read more
sourcefn dynamic_symbol_table(
&'file self
) -> Option<MachOSymbolTable<'data, 'file, Mach>>
fn dynamic_symbol_table(
&'file self
) -> Option<MachOSymbolTable<'data, 'file, Mach>>
Get the dynamic linking symbol table, if any. Read more
sourcefn object_map(&'file self) -> ObjectMap<'data>
fn object_map(&'file self) -> ObjectMap<'data>
Construct a map from addresses to symbol names and object file names. Read more
sourcefn dynamic_relocations(&'file self) -> Option<NoDynamicRelocationIterator>
fn dynamic_relocations(&'file self) -> Option<NoDynamicRelocationIterator>
Get the dynamic relocations for this file. Read more
sourcefn has_debug_symbols(&self) -> bool
fn has_debug_symbols(&self) -> bool
Return true if the file contains debug information sections, false if not.
sourcefn endianness(&self) -> Endianness
fn endianness(&self) -> Endianness
Get the endianness of the file.
sourcefn symbol_map(&'file self) -> SymbolMap<SymbolMapName<'data>>
fn symbol_map(&'file self) -> SymbolMap<SymbolMapName<'data>>
Construct a map from addresses to symbol names. Read more
Auto Trait Implementations
impl<'data, Mach> RefUnwindSafe for MachOFile<'data, Mach> where
Mach: RefUnwindSafe,
<Mach as MachHeader>::Endian: RefUnwindSafe,
<Mach as MachHeader>::Nlist: RefUnwindSafe,
<Mach as MachHeader>::Section: RefUnwindSafe,
impl<'data, Mach> Send for MachOFile<'data, Mach> where
Mach: Sync,
<Mach as MachHeader>::Endian: Send,
<Mach as MachHeader>::Nlist: Sync,
<Mach as MachHeader>::Section: Sync,
impl<'data, Mach> Sync for MachOFile<'data, Mach> where
Mach: Sync,
<Mach as MachHeader>::Endian: Sync,
<Mach as MachHeader>::Nlist: Sync,
<Mach as MachHeader>::Section: Sync,
impl<'data, Mach> Unpin for MachOFile<'data, Mach> where
<Mach as MachHeader>::Endian: Unpin,
impl<'data, Mach> UnwindSafe for MachOFile<'data, Mach> where
Mach: RefUnwindSafe,
<Mach as MachHeader>::Endian: UnwindSafe,
<Mach as MachHeader>::Nlist: RefUnwindSafe,
<Mach as MachHeader>::Section: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more