pub struct HashTable<'data, Elf: FileHeader> { /* private fields */ }
Expand description
A SysV symbol hash table in an ELF file.
Returned by SectionHeader::hash
.
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 an elf::SHT_HASH
section, or from a
segment pointed to via the elf::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.
Trait Implementations§
Auto Trait Implementations§
impl<'data, Elf> RefUnwindSafe for HashTable<'data, Elf>
impl<'data, Elf> Send for HashTable<'data, Elf>
impl<'data, Elf> Sync for HashTable<'data, Elf>
impl<'data, Elf> Unpin for HashTable<'data, Elf>
impl<'data, Elf> UnwindSafe for HashTable<'data, Elf>
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