Skip to main content

RelocationEvent

Struct RelocationEvent 

Source
pub struct RelocationEvent<'a, D: 'static, Arch: RelocationArch = NativeArch, R: RegionAccess = HostRegion, Tls: TlsResolver<Arch> = (), H = HashTable<<Arch as RelocationArch>::Layout>> { /* private fields */ }
Expand description

Context passed to relocation observer hooks.

This struct provides access to the relocation entry, the module being relocated, and the current symbol resolution scope.

Implementations§

Source§

impl<'a, D: 'static, Arch: RelocationArch, R: RegionAccess, Tls: TlsResolver<Arch>, H> RelocationEvent<'a, D, Arch, R, Tls, H>

Source

pub fn rel(&self) -> &ElfRelType<Arch>

Access the relocation entry.

Source

pub fn lib(&self) -> &ElfCore<D, Arch, R, Tls>

Access the core component where the relocation appears.

Source

pub fn scope(&self) -> &ModuleScope<Arch, Tls>

Access the current resolution scope.

Source

pub fn symbol(&self, r_sym: usize) -> SymbolEntry<'a, Arch::Layout>

Access a symbol table entry by index for this relocation context.

Source

pub fn relocation_symbol(&self) -> Option<SymbolEntry<'a, Arch::Layout>>

Access the symbol referenced by the current relocation, if it has one.

Source

pub fn find_symdef(&self, r_sym: usize) -> Option<SymDef<'a, Arch, Tls>>

Find symbol definition in the current scope.

Auto Trait Implementations§

§

impl<'a, D, Arch = X86_64Arch, R = HostRegion, Tls = (), H = HashTable<<Arch as RelocationArch>::Layout>> !RefUnwindSafe for RelocationEvent<'a, D, Arch, R, Tls, H>

§

impl<'a, D, Arch = X86_64Arch, R = HostRegion, Tls = (), H = HashTable<<Arch as RelocationArch>::Layout>> !Send for RelocationEvent<'a, D, Arch, R, Tls, H>

§

impl<'a, D, Arch = X86_64Arch, R = HostRegion, Tls = (), H = HashTable<<Arch as RelocationArch>::Layout>> !Sync for RelocationEvent<'a, D, Arch, R, Tls, H>

§

impl<'a, D, Arch = X86_64Arch, R = HostRegion, Tls = (), H = HashTable<<Arch as RelocationArch>::Layout>> !UnwindSafe for RelocationEvent<'a, D, Arch, R, Tls, H>

§

impl<'a, D, Arch, R, Tls, H> Freeze for RelocationEvent<'a, D, Arch, R, Tls, H>

§

impl<'a, D, Arch, R, Tls, H> Unpin for RelocationEvent<'a, D, Arch, R, Tls, H>

§

impl<'a, D, Arch, R, Tls, H> UnsafeUnpin for RelocationEvent<'a, D, Arch, R, Tls, H>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.