Struct object::read::elf::SymbolTable[][src]

pub struct SymbolTable<'data, Elf: FileHeader> { /* fields omitted */ }
Expand description

A table of symbol entries in an ELF file.

Also includes the string table used for the symbol names.

Implementations

impl<'data, Elf: FileHeader> SymbolTable<'data, Elf>[src]

pub fn parse<R: ReadRef<'data>>(
    endian: Elf::Endian,
    data: R,
    sections: &SectionTable<'_, Elf>,
    section_index: usize,
    section: &Elf::SectionHeader
) -> Result<SymbolTable<'data, Elf>>
[src]

Parse the given symbol table section.

pub fn section(&self) -> usize[src]

Return the section index of this symbol table.

pub fn strings(&self) -> StringTable<'data>[src]

Return the string table used for the symbol names.

pub fn iter(&self) -> Iter<'data, Elf::Sym>[src]

Iterate over the symbols.

pub fn is_empty(&self) -> bool[src]

Return true if the symbol table is empty.

pub fn len(&self) -> usize[src]

The number of symbols.

pub fn symbol(&self, index: usize) -> Result<&'data Elf::Sym>[src]

Return the symbol at the given index.

pub fn shndx(&self, index: usize) -> Option<u32>[src]

Return the extended section index for the given symbol if present.

pub fn symbol_name(
    &self,
    endian: Elf::Endian,
    symbol: &'data Elf::Sym
) -> Result<&'data [u8]>
[src]

Return the symbol name for the given symbol.

pub fn map<Entry: SymbolMapEntry, F: Fn(&'data Elf::Sym) -> Option<Entry>>(
    &self,
    endian: Elf::Endian,
    f: F
) -> SymbolMap<Entry>
[src]

Construct a map from addresses to a user-defined map entry.

Trait Implementations

impl<'data, Elf: Clone + FileHeader> Clone for SymbolTable<'data, Elf> where
    Elf::Sym: Clone
[src]

fn clone(&self) -> SymbolTable<'data, Elf>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'data, Elf: Debug + FileHeader> Debug for SymbolTable<'data, Elf> where
    Elf::Sym: Debug
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'data, Elf: FileHeader> Default for SymbolTable<'data, Elf>[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl<'data, Elf: Copy + FileHeader> Copy for SymbolTable<'data, Elf> where
    Elf::Sym: Copy
[src]

Auto Trait Implementations

impl<'data, Elf> RefUnwindSafe for SymbolTable<'data, Elf> where
    <Elf as FileHeader>::Sym: RefUnwindSafe

impl<'data, Elf> Send for SymbolTable<'data, Elf> where
    <Elf as FileHeader>::Sym: Sync

impl<'data, Elf> Sync for SymbolTable<'data, Elf> where
    <Elf as FileHeader>::Sym: Sync

impl<'data, Elf> Unpin for SymbolTable<'data, Elf>

impl<'data, Elf> UnwindSafe for SymbolTable<'data, Elf> where
    <Elf as FileHeader>::Sym: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.