Struct object::read::elf::SymbolTable
source · pub struct SymbolTable<'data, Elf: FileHeader, R = &'data [u8]>where
R: ReadRef<'data>,{ /* private fields */ }
Expand description
A table of symbol entries in an ELF file.
Also includes the string table used for the symbol names.
Implementations§
source§impl<'data, Elf: FileHeader, R: ReadRef<'data>> SymbolTable<'data, Elf, R>
impl<'data, Elf: FileHeader, R: ReadRef<'data>> SymbolTable<'data, Elf, R>
sourcepub fn parse(
endian: Elf::Endian,
data: R,
sections: &SectionTable<'data, Elf, R>,
section_index: SectionIndex,
section: &Elf::SectionHeader
) -> Result<SymbolTable<'data, Elf, R>>
pub fn parse(
endian: Elf::Endian,
data: R,
sections: &SectionTable<'data, Elf, R>,
section_index: SectionIndex,
section: &Elf::SectionHeader
) -> Result<SymbolTable<'data, Elf, R>>
Parse the given symbol table section.
sourcepub fn section(&self) -> SectionIndex
pub fn section(&self) -> SectionIndex
Return the section index of this symbol table.
sourcepub fn shndx_section(&self) -> SectionIndex
pub fn shndx_section(&self) -> SectionIndex
Return the section index of the shndx table.
sourcepub fn string_section(&self) -> SectionIndex
pub fn string_section(&self) -> SectionIndex
Return the section index of the linked string 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 symbol(&self, index: usize) -> Result<&'data Elf::Sym>
pub fn symbol(&self, index: usize) -> Result<&'data Elf::Sym>
Return the symbol at the given index.
sourcepub fn shndx(&self, index: usize) -> Option<u32>
pub fn shndx(&self, index: usize) -> Option<u32>
Return the extended section index for the given symbol if present.
sourcepub fn symbol_section(
&self,
endian: Elf::Endian,
symbol: &'data Elf::Sym,
index: usize
) -> Result<Option<SectionIndex>>
pub fn symbol_section(
&self,
endian: Elf::Endian,
symbol: &'data Elf::Sym,
index: usize
) -> Result<Option<SectionIndex>>
Return the section index for the given symbol.
This uses the extended section index if present.
Trait Implementations§
source§impl<'data, Elf: Clone + FileHeader, R> Clone for SymbolTable<'data, Elf, R>where
R: ReadRef<'data> + Clone,
Elf::Sym: Clone,
impl<'data, Elf: Clone + FileHeader, R> Clone for SymbolTable<'data, Elf, R>where
R: ReadRef<'data> + Clone,
Elf::Sym: Clone,
source§fn clone(&self) -> SymbolTable<'data, Elf, R>
fn clone(&self) -> SymbolTable<'data, Elf, R>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more