Struct object::read::coff::SymbolTable
source · pub struct SymbolTable<'data, R = &'data [u8]>where
R: ReadRef<'data>,{ /* private fields */ }
Expand description
A table of symbol entries in a COFF or PE file.
Also includes the string table used for the symbol names.
Implementations§
source§impl<'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> ⓘ
pub fn iter<'table>(&'table self) -> SymbolIterator<'data, 'table, R> ⓘ
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.