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,
}
Expand description
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§
Source§impl Sym
impl Sym
pub fn size(container: Container) -> usize
Sourcepub fn is_import(&self) -> bool
pub fn is_import(&self) -> bool
Checks whether this Sym
has STB_GLOBAL
/STB_WEAK
bind and a st_value
of 0
Sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Checks whether this Sym
has type STT_FUNC
Sourcepub fn st_visibility(&self) -> u8
pub fn st_visibility(&self) -> u8
Get the ST visibility.
This is the last three bits of the “other” byte.
Trait Implementations§
Source§impl<'a> TryFromCtx<'a, Ctx> for Sym
impl<'a> TryFromCtx<'a, Ctx> for Sym
Source§impl TryIntoCtx<Ctx> for Sym
impl TryIntoCtx<Ctx> for Sym
impl Copy for Sym
impl StructuralPartialEq for Sym
Auto Trait Implementations§
impl Freeze for Sym
impl RefUnwindSafe for Sym
impl Send for Sym
impl Sync for Sym
impl Unpin for Sym
impl UnwindSafe for Sym
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more