Trait object::read::elf::symbol::Sym

source ·
pub trait Sym: Debug + Pod {
    type Word: Into<u64>;
    type Endian: Endian;

Show 16 methods // Required methods fn st_name(&self, endian: Self::Endian) -> u32; fn st_info(&self) -> u8; fn st_bind(&self) -> u8; fn st_type(&self) -> u8; fn st_other(&self) -> u8; fn st_visibility(&self) -> u8; fn st_shndx(&self, endian: Self::Endian) -> u16; fn st_value(&self, endian: Self::Endian) -> Self::Word; fn st_size(&self, endian: Self::Endian) -> Self::Word; // Provided methods fn name<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, strings: StringTable<'data, R>, ) -> Result<&'data [u8]> { ... } fn is_undefined(&self, endian: Self::Endian) -> bool { ... } fn is_definition(&self, endian: Self::Endian) -> bool { ... } fn is_common(&self, endian: Self::Endian) -> bool { ... } fn is_absolute(&self, endian: Self::Endian) -> bool { ... } fn is_local(&self) -> bool { ... } fn is_weak(&self) -> bool { ... }
}
Expand description

A trait for generic access to elf::Sym32 and elf::Sym64.

Required Associated Types§

Required Methods§

source

fn st_name(&self, endian: Self::Endian) -> u32

source

fn st_info(&self) -> u8

source

fn st_bind(&self) -> u8

source

fn st_type(&self) -> u8

source

fn st_other(&self) -> u8

source

fn st_visibility(&self) -> u8

source

fn st_shndx(&self, endian: Self::Endian) -> u16

source

fn st_value(&self, endian: Self::Endian) -> Self::Word

source

fn st_size(&self, endian: Self::Endian) -> Self::Word

Provided Methods§

source

fn name<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, strings: StringTable<'data, R>, ) -> Result<&'data [u8]>

Parse the symbol name from the string table.

source

fn is_undefined(&self, endian: Self::Endian) -> bool

Return true if the symbol section is SHN_UNDEF.

source

fn is_definition(&self, endian: Self::Endian) -> bool

Return true if the symbol is a definition of a function or data object.

source

fn is_common(&self, endian: Self::Endian) -> bool

Return true if the symbol section is SHN_COMMON.

source

fn is_absolute(&self, endian: Self::Endian) -> bool

Return true if the symbol section is SHN_ABS.

source

fn is_local(&self) -> bool

Return true if the symbol binding is STB_LOCAL.

source

fn is_weak(&self) -> bool

Return true if the symbol binding is STB_WEAK.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Endian: Endian> Sym for Sym32<Endian>

§

type Word = u32

§

type Endian = Endian

source§

impl<Endian: Endian> Sym for Sym64<Endian>

§

type Word = u64

§

type Endian = Endian