[][src]Struct goblin::elf::sym::Sym

pub struct Sym {
    pub st_name: usize,
    pub st_info: u8,
    pub st_other: u8,
    pub st_shndx: usize,
    pub st_value: u64,
    pub st_size: u64,
}

A unified Sym definition - convertable to and from 32-bit and 64-bit variants

Fields

st_name: usizest_info: u8st_other: u8st_shndx: usizest_value: u64st_size: u64

Methods

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]

Parse count vector of ELF symbols from offset

Trait Implementations

impl PartialEq<Sym> 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 Clone for Sym[src]

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

Performs copy-assignment from source. Read more

impl Debug for Sym[src]

impl<'a> TryFromCtx<'a, Ctx, [u8]> for Sym[src]

type Error = Error

type Size = usize

impl IntoCtx<Ctx, [u8]> for Sym[src]

impl TryIntoCtx<Ctx, [u8]> for Sym[src]

type Error = Error

type Size = usize

impl SizeWith<Ctx> for Sym[src]

type Units = usize

Auto Trait Implementations

impl Send for Sym

impl Unpin for Sym

impl Sync for Sym

impl UnwindSafe for Sym

impl RefUnwindSafe for Sym

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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.

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

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

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