Struct goblin::elf::sym::Sym [−][src]
A unified Sym definition - convertible to and from 32-bit and 64-bit variants
Fields
st_name: usize
st_info: u8
st_other: u8
st_shndx: usize
st_value: u64
st_size: u64
Implementations
impl Sym
[src][−]
pub fn size(container: Container) -> usize
[src]
pub fn is_import(&self) -> bool
[src][−]
Checks whether this Sym
has STB_GLOBAL
/STB_WEAK
bind and a st_value
of 0
pub fn is_function(&self) -> bool
[src][−]
Checks whether this Sym
has type STT_FUNC
pub fn st_bind(&self) -> u8
[src][−]
Get the ST bind.
This is the first four bits of the “info” byte.
pub fn st_type(&self) -> u8
[src][−]
Get the ST type.
This is the last four bits of the “info” byte.
pub fn st_visibility(&self) -> u8
[src][−]
Get the ST visibility.
This is the last three bits of the “other” byte.
pub fn parse(
bytes: &[u8],
offset: usize,
count: usize,
ctx: Ctx
) -> Result<Vec<Sym>>
[src][−]
bytes: &[u8],
offset: usize,
count: usize,
ctx: Ctx
) -> Result<Vec<Sym>>
Parse count
vector of ELF symbols from offset
Trait Implementations
impl Clone for Sym
[src][+]
impl Copy for Sym
[src]
impl Debug for Sym
[src][+]
impl Default for Sym
[src][+]
impl From<Sym> for ElfSym
[src][+]
impl From<Sym> for Sym
[src][+]
impl From<Sym> for ElfSym
[src][+]
impl From<Sym> for Sym
[src][+]
impl IntoCtx<Ctx, [u8]> for Sym
[src][+]
impl PartialEq<Sym> for Sym
[src][+]
impl SizeWith<Ctx> for Sym
[src][+]
impl StructuralPartialEq for Sym
[src]
impl<'a> TryFromCtx<'a, Ctx, [u8]> for Sym
[src][+]
impl TryIntoCtx<Ctx, [u8]> for Sym
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for Sym
impl Send for Sym
impl Sync for Sym
impl Unpin for Sym
impl UnwindSafe for Sym
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,