pub struct File<'data> { /* private fields */ }
Expand description
An object file.
Most functionality is provided by the Object
trait implementation.
Implementations
Trait Implementations
sourceimpl<'data, 'file> Object<'data, 'file> for File<'data> where
'data: 'file,
impl<'data, 'file> Object<'data, 'file> for File<'data> where
'data: 'file,
type SegmentIterator = SegmentIterator<'data, 'file>
type SegmentIterator = SegmentIterator<'data, 'file>
An iterator over the segments in the object file.
type SectionIterator = SectionIterator<'data, 'file>
type SectionIterator = SectionIterator<'data, 'file>
An iterator over the sections in the object file.
type ComdatIterator = ComdatIterator<'data, 'file>
type ComdatIterator = ComdatIterator<'data, 'file>
An iterator over the COMDAT section groups in the object file.
type SymbolIterator = SymbolIterator<'data, 'file>
type SymbolIterator = SymbolIterator<'data, 'file>
An iterator over symbols in the object file.
type SymbolTable = SymbolTable<'data, 'file>
type SymbolTable = SymbolTable<'data, 'file>
A symbol table in the object file.
type DynamicRelocationIterator = DynamicRelocationIterator<'data, 'file>
type DynamicRelocationIterator = DynamicRelocationIterator<'data, 'file>
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) -> SegmentIterator<'data, 'file>ⓘNotable traits for SegmentIterator<'data, 'file>impl<'data, 'file> Iterator for SegmentIterator<'data, 'file> type Item = Segment<'data, 'file>;
fn segments(&'file self) -> SegmentIterator<'data, 'file>ⓘNotable traits for SegmentIterator<'data, 'file>impl<'data, 'file> Iterator for SegmentIterator<'data, 'file> type Item = Segment<'data, 'file>;
Get an iterator over the segments in the file.
sourcefn section_by_name(
&'file self,
section_name: &str
) -> Option<Section<'data, 'file>>
fn section_by_name(
&'file self,
section_name: &str
) -> Option<Section<'data, 'file>>
Get the section named section_name
, if such a section exists. Read more
sourcefn section_by_index(
&'file self,
index: SectionIndex
) -> Result<Section<'data, 'file>>
fn section_by_index(
&'file self,
index: SectionIndex
) -> Result<Section<'data, 'file>>
Get the section at the given index. Read more
sourcefn sections(&'file self) -> SectionIterator<'data, 'file>ⓘNotable traits for SectionIterator<'data, 'file>impl<'data, 'file> Iterator for SectionIterator<'data, 'file> type Item = Section<'data, 'file>;
fn sections(&'file self) -> SectionIterator<'data, 'file>ⓘNotable traits for SectionIterator<'data, 'file>impl<'data, 'file> Iterator for SectionIterator<'data, 'file> type Item = Section<'data, 'file>;
Get an iterator over the sections in the file.
sourcefn comdats(&'file self) -> ComdatIterator<'data, 'file>ⓘNotable traits for ComdatIterator<'data, 'file>impl<'data, 'file> Iterator for ComdatIterator<'data, 'file> type Item = Comdat<'data, 'file>;
fn comdats(&'file self) -> ComdatIterator<'data, 'file>ⓘNotable traits for ComdatIterator<'data, 'file>impl<'data, 'file> Iterator for ComdatIterator<'data, 'file> type Item = Comdat<'data, 'file>;
Get an iterator over the COMDAT section groups in the file.
sourcefn symbol_by_index(
&'file self,
index: SymbolIndex
) -> Result<Symbol<'data, 'file>>
fn symbol_by_index(
&'file self,
index: SymbolIndex
) -> Result<Symbol<'data, 'file>>
Get the debugging symbol at the given index. Read more
sourcefn symbols(&'file self) -> SymbolIterator<'data, 'file>ⓘNotable traits for SymbolIterator<'data, 'file>impl<'data, 'file> Iterator for SymbolIterator<'data, 'file> type Item = Symbol<'data, 'file>;
fn symbols(&'file self) -> SymbolIterator<'data, 'file>ⓘNotable traits for SymbolIterator<'data, 'file>impl<'data, 'file> Iterator for SymbolIterator<'data, 'file> type Item = Symbol<'data, 'file>;
Get an iterator over the debugging symbols in the file. Read more
sourcefn symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>>
fn symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>>
Get the symbol table, if any.
sourcefn dynamic_symbols(&'file self) -> SymbolIterator<'data, 'file>ⓘNotable traits for SymbolIterator<'data, 'file>impl<'data, 'file> Iterator for SymbolIterator<'data, 'file> type Item = Symbol<'data, 'file>;
fn dynamic_symbols(&'file self) -> SymbolIterator<'data, 'file>ⓘNotable traits for SymbolIterator<'data, 'file>impl<'data, 'file> Iterator for SymbolIterator<'data, 'file> type Item = Symbol<'data, 'file>;
Get an iterator over the dynamic linking symbols in the file. Read more
sourcefn dynamic_symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>>
fn dynamic_symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>>
Get the dynamic linking symbol table, if any. Read more
sourcefn dynamic_relocations(
&'file self
) -> Option<DynamicRelocationIterator<'data, 'file>>
fn dynamic_relocations(
&'file self
) -> Option<DynamicRelocationIterator<'data, 'file>>
Get the dynamic relocations for this file. Read more
sourcefn symbol_map(&self) -> SymbolMap<SymbolMapName<'data>>
fn symbol_map(&self) -> SymbolMap<SymbolMapName<'data>>
Construct a map from addresses to symbol names. Read more
sourcefn object_map(&self) -> ObjectMap<'data>
fn object_map(&self) -> ObjectMap<'data>
Construct a map from addresses to symbol names and object file names. 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 build_id(&self) -> Result<Option<&'data [u8]>>
fn build_id(&self) -> Result<Option<&'data [u8]>>
The build ID from an ELF NT_GNU_BUILD_ID
note.
sourcefn gnu_debuglink(&self) -> Result<Option<(&'data [u8], u32)>>
fn gnu_debuglink(&self) -> Result<Option<(&'data [u8], u32)>>
The filename and CRC from a .gnu_debuglink
section.
sourcefn endianness(&self) -> Endianness
fn endianness(&self) -> Endianness
Get the endianness of the file.
Auto Trait Implementations
impl<'data> RefUnwindSafe for File<'data>
impl<'data> Send for File<'data>
impl<'data> Sync for File<'data>
impl<'data> Unpin for File<'data>
impl<'data> UnwindSafe for File<'data>
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