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>
impl<'a, D: '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) -> &ModuleScope<Arch, Tls>
pub fn scope(&self) -> &ModuleScope<Arch, Tls>
Access the current resolution scope.
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 find_symdef(&self, r_sym: usize) -> Option<SymDef<'a, Arch, Tls>>
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> 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