pub struct SymbolTable<'data, Xcoff, R = &'data [u8]>where
Xcoff: FileHeader,
R: ReadRef<'data>,{ /* private fields */ }
Expand description
A table of symbol entries in an XCOFF file.
Also includes the string table used for the symbol names.
Returned by FileHeader::symbols
.
Implementations§
Source§impl<'data, Xcoff, R> SymbolTable<'data, Xcoff, R>where
Xcoff: FileHeader,
R: ReadRef<'data>,
impl<'data, Xcoff, R> SymbolTable<'data, Xcoff, R>where
Xcoff: FileHeader,
R: ReadRef<'data>,
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 iter<'table>(&'table self) -> SymbolIterator<'data, 'table, Xcoff, R> ⓘ
pub fn iter<'table>(&'table self) -> SymbolIterator<'data, 'table, Xcoff, R> ⓘ
Iterate over the symbols.
This does not return null symbols.
Sourcepub fn get<T: Pod>(&self, index: SymbolIndex, offset: usize) -> Result<&'data T>
pub fn get<T: Pod>(&self, index: SymbolIndex, offset: usize) -> Result<&'data T>
Return the symbol entry at the given index and offset.
Sourcepub fn symbol(&self, index: SymbolIndex) -> Result<&'data Xcoff::Symbol>
pub fn symbol(&self, index: SymbolIndex) -> Result<&'data Xcoff::Symbol>
Get the symbol at the given index.
Returns an error for null symbols and out of bounds indices. Note that this is unable to check whether the index is an auxiliary symbol.
Sourcepub fn aux_file(
&self,
index: SymbolIndex,
offset: usize,
) -> Result<&'data Xcoff::FileAux>
pub fn aux_file( &self, index: SymbolIndex, offset: usize, ) -> Result<&'data Xcoff::FileAux>
Return a file auxiliary symbol.
Sourcepub fn aux_csect(
&self,
index: SymbolIndex,
offset: usize,
) -> Result<&'data Xcoff::CsectAux>
pub fn aux_csect( &self, index: SymbolIndex, offset: usize, ) -> Result<&'data Xcoff::CsectAux>
Return the csect auxiliary symbol.