pub struct Elf<'a> { /* private fields */ }
Expand description
Wrapper around goblin::elf::Elf
.
Implementations
sourceimpl<'a> Elf<'a>
impl<'a> Elf<'a>
sourcepub fn new(path: impl Into<PathBuf>) -> Self
pub fn new(path: impl Into<PathBuf>) -> Self
Create a new Elf
which is loaded from the given path.
sourcepub fn from_bytes(bytes: &'a [u8]) -> Self
pub fn from_bytes(bytes: &'a [u8]) -> Self
sourcepub fn symbols(&self) -> &HashMap<&'a str, usize>
pub fn symbols(&self) -> &HashMap<&'a str, usize>
A name->address mapping of the symbols in the ELF.
sourcepub fn got(&self) -> &HashMap<&'a str, usize>
pub fn got(&self) -> &HashMap<&'a str, usize>
A name->address mapping of the GOT entries in the ELF.
sourcepub fn plt(&self) -> &HashMap<&'a str, usize>
pub fn plt(&self) -> &HashMap<&'a str, usize>
A name->address mapping of the PLT entries in the ELF.
sourcepub fn address(&self) -> usize
pub fn address(&self) -> usize
The address the ELF is loaded at (may be 0 for a relocatable ELF).
sourcepub fn set_address(&mut self, address: usize) -> usize
pub fn set_address(&mut self, address: usize) -> usize
Set the ELF’s load address, rebasing all values.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Elf<'a>
impl<'a> Send for Elf<'a>
impl<'a> Sync for Elf<'a>
impl<'a> Unpin for Elf<'a>
impl<'a> UnwindSafe for Elf<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more