Struct goblin::elf::sym::Sym [−][src]
A unified Sym definition - convertible to and from 32-bit and 64-bit variants
Fields
st_name: usizest_info: u8st_other: u8st_shndx: usizest_value: u64st_size: u64Implementations
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]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>[src]
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
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,
pub fn borrow_mut(&mut self) -> &mut T[src]
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,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,