pub struct Relocation {
pub offset: u64,
pub rel_type: RelocationType,
pub symbol_index: u32,
pub symbol_name: Option<String>,
}Fields§
§offset: u64§rel_type: RelocationType§symbol_index: u32§symbol_name: Option<String>Implementations§
Source§impl Relocation
impl Relocation
Sourcepub fn from_elf_file(
elf_file: &ElfFile64<'_, Endianness>,
) -> Result<Vec<Self>, DisassemblerError>
pub fn from_elf_file( elf_file: &ElfFile64<'_, Endianness>, ) -> Result<Vec<Self>, DisassemblerError>
Parse relocation entries from the provided ELF file
Sourcepub fn relative_offset(&self, base_offset: u64) -> u64
pub fn relative_offset(&self, base_offset: u64) -> u64
Return this relocation’s offset relative to the provided base offset
Sourcepub fn is_syscall(&self) -> bool
pub fn is_syscall(&self) -> bool
Check if this is a syscall relocation
Trait Implementations§
Source§impl Clone for Relocation
impl Clone for Relocation
Source§fn clone(&self) -> Relocation
fn clone(&self) -> Relocation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Relocation
impl Debug for Relocation
Source§impl<'de> Deserialize<'de> for Relocation
impl<'de> Deserialize<'de> for Relocation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Relocation
impl RefUnwindSafe for Relocation
impl Send for Relocation
impl Sync for Relocation
impl Unpin for Relocation
impl UnsafeUnpin for Relocation
impl UnwindSafe for Relocation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more