Struct lief::elf::relocation::Relocation
pub struct Relocation<'a> { /* private fields */ }
Expand description
Structure which reprents an ELF relocation
Implementations§
§impl Relocation<'_>
impl Relocation<'_>
pub fn is_rela(&self) -> bool
pub fn is_rela(&self) -> bool
Check if the relocation uses the explicit Relocation::addend
field
(this is usually the case for 64 bits binaries)
pub fn is_rel(&self) -> bool
pub fn is_rel(&self) -> bool
Check if the relocation uses the implicit addend (i.e. not present in the ELF structure)
pub fn architecture(&self) -> u32
pub fn architecture(&self) -> u32
Target architecture for this relocation
pub fn symbol_table(&self) -> Option<Section<'_>>
pub fn symbol_table(&self) -> Option<Section<'_>>
The associated symbol table (if any)
pub fn resolve_with_base_address(&self, base_address: u64) -> Result<u64, Error>
pub fn resolve_with_base_address(&self, base_address: u64) -> Result<u64, Error>
Try to resolve the value of the relocation with the provided base address.
The returned value could be used such as: *address = resolve_with_base_address(...)
See: Relocation::resolve
Trait Implementations§
§impl Debug for Relocation<'_>
impl Debug for Relocation<'_>
§impl Relocation for Relocation<'_>
impl Relocation for Relocation<'_>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Relocation<'a>
impl<'a> !Send for Relocation<'a>
impl<'a> !Sync for Relocation<'a>
impl<'a> Unpin for Relocation<'a>
impl<'a> UnwindSafe for Relocation<'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