pub struct HashTable<'data, Elf: FileHeader> { /* private fields */ }
Expand description
A SysV symbol hash table in an ELF file.
Implementations§
source§impl<'data, Elf: FileHeader> HashTable<'data, Elf>
impl<'data, Elf: FileHeader> HashTable<'data, Elf>
sourcepub fn parse(endian: Elf::Endian, data: &'data [u8]) -> Result<Self>
pub fn parse(endian: Elf::Endian, data: &'data [u8]) -> Result<Self>
Parse a SysV hash table.
data
should be from a SHT_HASH
section, or from a
segment pointed to via the DT_HASH
entry.
The header is read at offset 0 in the given data
.
sourcepub fn symbol_table_length(&self) -> u32
pub fn symbol_table_length(&self) -> u32
Return the symbol table length.
sourcepub fn find<R: ReadRef<'data>>(
&self,
endian: Elf::Endian,
name: &[u8],
hash: u32,
version: Option<&Version<'_>>,
symbols: &SymbolTable<'data, Elf, R>,
versions: &VersionTable<'data, Elf>
) -> Option<(usize, &'data Elf::Sym)>
pub fn find<R: ReadRef<'data>>(
&self,
endian: Elf::Endian,
name: &[u8],
hash: u32,
version: Option<&Version<'_>>,
symbols: &SymbolTable<'data, Elf, R>,
versions: &VersionTable<'data, Elf>
) -> Option<(usize, &'data Elf::Sym)>
Use the hash table to find the symbol table entry with the given name, hash and version.