Expand description
A table of symbol entries in a COFF or PE file.
Also includes the string table used for the symbol names.
Implementations
sourceimpl<'data, R: ReadRef<'data>> SymbolTable<'data, R>
impl<'data, R: ReadRef<'data>> SymbolTable<'data, R>
sourcepub fn parse(header: &ImageFileHeader, data: R) -> Result<Self>
pub fn parse(header: &ImageFileHeader, data: R) -> Result<Self>
Read the symbol table.
sourcepub fn strings(&self) -> StringTable<'data, R>
pub fn strings(&self) -> StringTable<'data, R>
Return the string table used for the symbol names.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
The number of symbol table entries.
This includes auxiliary symbol table entries.
sourcepub fn iter<'table>(&'table self) -> SymbolIterator<'data, 'table, R>ⓘNotable traits for SymbolIterator<'data, 'table, R>impl<'data, 'table, R: ReadRef<'data>> Iterator for SymbolIterator<'data, 'table, R> type Item = (usize, &'data ImageSymbol);
pub fn iter<'table>(&'table self) -> SymbolIterator<'data, 'table, R>ⓘNotable traits for SymbolIterator<'data, 'table, R>impl<'data, 'table, R: ReadRef<'data>> Iterator for SymbolIterator<'data, 'table, R> type Item = (usize, &'data ImageSymbol);
Iterate over the symbols.
sourcepub fn symbol(&self, index: usize) -> Result<&'data ImageSymbol>
pub fn symbol(&self, index: usize) -> Result<&'data ImageSymbol>
Return the symbol table entry at the given index.
sourcepub fn aux_function(
&self,
index: usize
) -> Result<&'data ImageAuxSymbolFunction>
pub fn aux_function(
&self,
index: usize
) -> Result<&'data ImageAuxSymbolFunction>
Return the auxiliary function symbol for the symbol table entry at the given index.
Note that the index is of the symbol, not the first auxiliary record.
sourcepub fn aux_section(&self, index: usize) -> Result<&'data ImageAuxSymbolSection>
pub fn aux_section(&self, index: usize) -> Result<&'data ImageAuxSymbolSection>
Return the auxiliary section symbol for the symbol table entry at the given index.
Note that the index is of the symbol, not the first auxiliary record.
sourcepub fn aux_file_name(&self, index: usize, aux_count: u8) -> Result<&'data [u8]>
pub fn aux_file_name(&self, index: usize, aux_count: u8) -> Result<&'data [u8]>
Return the auxiliary file name for the symbol table entry at the given index.
Note that the index is of the symbol, not the first auxiliary record.
sourcepub fn get<T: Pod>(&self, index: usize, offset: usize) -> Result<&'data T>
pub fn get<T: Pod>(&self, index: usize, offset: usize) -> Result<&'data T>
Return the symbol table entry or auxiliary record at the given index and offset.
sourcepub fn map<Entry: SymbolMapEntry, F: Fn(&'data ImageSymbol) -> Option<Entry>>(
&self,
f: F
) -> SymbolMap<Entry>
pub fn map<Entry: SymbolMapEntry, F: Fn(&'data ImageSymbol) -> Option<Entry>>(
&self,
f: F
) -> SymbolMap<Entry>
Construct a map from addresses to a user-defined map entry.
Trait Implementations
sourceimpl<'data, R: Debug> Debug for SymbolTable<'data, R> where
R: ReadRef<'data>,
impl<'data, R: Debug> Debug for SymbolTable<'data, R> where
R: ReadRef<'data>,
Auto Trait Implementations
impl<'data, R> RefUnwindSafe for SymbolTable<'data, R> where
R: RefUnwindSafe,
impl<'data, R> Send for SymbolTable<'data, R> where
R: Send,
impl<'data, R> Sync for SymbolTable<'data, R> where
R: Sync,
impl<'data, R> Unpin for SymbolTable<'data, R> where
R: Unpin,
impl<'data, R> UnwindSafe for SymbolTable<'data, R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more