pub struct Elf<'a> { /* private fields */ }
Expand description
Wrapper around goblin::elf::Elf
.
Implementations§
Source§impl<'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> !Freeze for Elf<'a>
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§
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