Struct goblin::pe::symbol::SymbolTable
source · pub struct SymbolTable<'a> { /* private fields */ }
Expand description
A COFF symbol table.
Implementations§
source§impl<'a> SymbolTable<'a>
impl<'a> SymbolTable<'a>
sourcepub fn parse(
bytes: &'a [u8],
offset: usize,
number: usize
) -> Result<SymbolTable<'a>>
pub fn parse( bytes: &'a [u8], offset: usize, number: usize ) -> Result<SymbolTable<'a>>
Parse a COFF symbol table at the given offset.
The offset and number of symbols should be from the COFF header.
sourcepub fn get(&self, index: usize) -> Option<(Option<&'a str>, Symbol)>
pub fn get(&self, index: usize) -> Option<(Option<&'a str>, Symbol)>
Get the symbol at the given index.
If the symbol has an inline name, then also returns a reference to the name’s
location in bytes
.
sourcepub fn aux_function_definition(
&self,
index: usize
) -> Option<AuxFunctionDefinition>
pub fn aux_function_definition( &self, index: usize ) -> Option<AuxFunctionDefinition>
Get the auxiliary symbol record for a function definition.
sourcepub fn aux_begin_and_end_function(
&self,
index: usize
) -> Option<AuxBeginAndEndFunction>
pub fn aux_begin_and_end_function( &self, index: usize ) -> Option<AuxBeginAndEndFunction>
Get the auxiliary symbol record for a .bf
or .ef
symbol record.
sourcepub fn aux_weak_external(&self, index: usize) -> Option<AuxWeakExternal>
pub fn aux_weak_external(&self, index: usize) -> Option<AuxWeakExternal>
Get the auxiliary symbol record for a weak external.
sourcepub fn aux_file(&self, index: usize, number: usize) -> Option<&'a str>
pub fn aux_file(&self, index: usize, number: usize) -> Option<&'a str>
Get the file name from the auxiliary symbol record for a file symbol record.
sourcepub fn aux_section_definition(
&self,
index: usize
) -> Option<AuxSectionDefinition>
pub fn aux_section_definition( &self, index: usize ) -> Option<AuxSectionDefinition>
Get the auxiliary symbol record for a section definition.
sourcepub fn iter(&self) -> SymbolIterator<'a> ⓘ
pub fn iter(&self) -> SymbolIterator<'a> ⓘ
Return an iterator for the COFF symbols.
This iterator skips over auxiliary symbol records.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for SymbolTable<'a>
impl<'a> Send for SymbolTable<'a>
impl<'a> Sync for SymbolTable<'a>
impl<'a> Unpin for SymbolTable<'a>
impl<'a> UnwindSafe for SymbolTable<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more