pub struct RelocationEvent<'a, D: Send + Sync + '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: Send + Sync + 'static, Arch: RelocationArch, R: RegionAccess, Tls: TlsResolver<Arch>, H> RelocationEvent<'a, D, Arch, R, Tls, H>
impl<'a, D: Send + Sync + 'static, Arch: RelocationArch, R: RegionAccess, Tls: TlsResolver<Arch>, H> RelocationEvent<'a, D, Arch, R, Tls, H>
Sourcepub fn rel(&self) -> &ElfRelType<Arch>
pub fn rel(&self) -> &ElfRelType<Arch>
Access the relocation entry.
Sourcepub fn lib(&self) -> &ElfCore<D, Arch, R, Tls>
pub fn lib(&self) -> &ElfCore<D, Arch, R, Tls>
Access the core component where the relocation appears.
Sourcepub fn scope(&self) -> &LocalScope<Arch, Tls>
pub fn scope(&self) -> &LocalScope<Arch, Tls>
Returns the local lookup scope.
bind_symdef also searches the linker-global scope
active for this relocation.
Sourcepub fn lazy(&self) -> Option<LazyValues>
pub fn lazy(&self) -> Option<LazyValues>
Returns values supplied by the lazy binder, when active.
Sourcepub fn symbol(&self, r_sym: usize) -> SymbolEntry<'a, Arch::Layout>
pub fn symbol(&self, r_sym: usize) -> SymbolEntry<'a, Arch::Layout>
Access a symbol table entry by index for this relocation context.
Sourcepub fn relocation_symbol(&self) -> Option<SymbolEntry<'a, Arch::Layout>>
pub fn relocation_symbol(&self) -> Option<SymbolEntry<'a, Arch::Layout>>
Access the symbol referenced by the current relocation, if it has one.
Sourcepub fn bind_symdef(&mut self, r_sym: usize) -> Option<SymDef<'_, Arch, Tls>>
pub fn bind_symdef(&mut self, r_sym: usize) -> Option<SymDef<'_, Arch, Tls>>
Finds a symbol definition and records its provider as a runtime dependency.
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>> !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>where
&'a ElfCore<D, Arch, R, Tls>: Freeze,
&'a <Arch as RelocationArch>::Relocation: Freeze,
&'a SymbolResolver<'a, Arch, Tls>: Freeze,
SymbolTableView<'a, <Arch as RelocationArch>::Layout, H>: Freeze,
impl<'a, D, Arch, R, Tls, H> Send for RelocationEvent<'a, D, Arch, R, Tls, H>where
&'a ElfCore<D, Arch, R, Tls>: Send,
&'a <Arch as RelocationArch>::Relocation: Send,
&'a SymbolResolver<'a, Arch, Tls>: Send,
SymbolTableView<'a, <Arch as RelocationArch>::Layout, H>: Send,
impl<'a, D, Arch, R, Tls, H> Sync for RelocationEvent<'a, D, Arch, R, Tls, H>where
&'a ElfCore<D, Arch, R, Tls>: Sync,
&'a <Arch as RelocationArch>::Relocation: Sync,
&'a SymbolResolver<'a, Arch, Tls>: Sync,
SymbolTableView<'a, <Arch as RelocationArch>::Layout, H>: Sync,
impl<'a, D, Arch, R, Tls, H> Unpin for RelocationEvent<'a, D, Arch, R, Tls, H>where
&'a ElfCore<D, Arch, R, Tls>: Unpin,
&'a <Arch as RelocationArch>::Relocation: Unpin,
&'a SymbolResolver<'a, Arch, Tls>: Unpin,
SymbolTableView<'a, <Arch as RelocationArch>::Layout, H>: Unpin,
impl<'a, D, Arch, R, Tls, H> UnsafeUnpin for RelocationEvent<'a, D, Arch, R, Tls, H>where
&'a ElfCore<D, Arch, R, Tls>: UnsafeUnpin,
&'a <Arch as RelocationArch>::Relocation: UnsafeUnpin,
&'a SymbolResolver<'a, Arch, Tls>: UnsafeUnpin,
SymbolTableView<'a, <Arch as RelocationArch>::Layout, H>: UnsafeUnpin,
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