pub struct GnuHashTable<'data, Elf: FileHeader> { /* private fields */ }
Expand description
A GNU symbol hash table in an ELF file.
Implementations
sourceimpl<'data, Elf: FileHeader> GnuHashTable<'data, Elf>
impl<'data, Elf: FileHeader> GnuHashTable<'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 GNU hash table.
data
should be from a SHT_GNU_HASH
section, or from a
segment pointed to via the DT_GNU_HASH
entry.
The header is read at offset 0 in the given data
.
The header does not contain a length field, and so all of data
will be used as the hash table values. It does not matter if this
is longer than needed, and this will often the case when accessing
the hash table via the DT_GNU_HASH
entry.
sourcepub fn symbol_base(&self) -> u32
pub fn symbol_base(&self) -> u32
Return the symbol table index of the first symbol in the hash table.
sourcepub fn symbol_table_length(&self, endian: Elf::Endian) -> Option<u32>
pub fn symbol_table_length(&self, endian: Elf::Endian) -> Option<u32>
Determine the symbol table length by finding the last entry in the hash table.
Returns None
if the hash table is empty or invalid.
Trait Implementations
Auto Trait Implementations
impl<'data, Elf> RefUnwindSafe for GnuHashTable<'data, Elf> where
<Elf as FileHeader>::Endian: RefUnwindSafe,
impl<'data, Elf> Send for GnuHashTable<'data, Elf> where
<Elf as FileHeader>::Endian: Sync,
impl<'data, Elf> Sync for GnuHashTable<'data, Elf> where
<Elf as FileHeader>::Endian: Sync,
impl<'data, Elf> Unpin for GnuHashTable<'data, Elf>
impl<'data, Elf> UnwindSafe for GnuHashTable<'data, Elf> where
<Elf as FileHeader>::Endian: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more