pub struct RelocatorRun<'cfg, T, Arch: RelocationArch = NativeArch, Obs = (), Tls: TlsResolver<Arch> = (), Binder = ()> { /* private fields */ }Expand description
Per-image relocation run state.
A run owns the raw image being relocated and the scope being assembled for
that image. It consumes itself when relocate is called.
Implementations§
Source§impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
Sourcepub fn observer<NewObs>(
self,
observer: NewObs,
) -> RelocatorRun<'cfg, T, Arch, NewObs, Tls, Binder>where
NewObs: RelocationObserver<Arch>,
pub fn observer<NewObs>(
self,
observer: NewObs,
) -> RelocatorRun<'cfg, T, Arch, NewObs, Tls, Binder>where
NewObs: RelocationObserver<Arch>,
Sets the runtime-linker observer used during relocation.
Sourcepub fn binding(self, binding: BindingMode) -> Self
pub fn binding(self, binding: BindingMode) -> Self
Overrides the relocation binding mode.
Sourcepub fn lookup_order(self, order: LookupOrder) -> Self
pub fn lookup_order(self, order: LookupOrder) -> Self
Sets precedence between the local and context-global lookup scopes.
Sourcepub fn global_scope(self, global: &GlobalScope<Arch, Tls>) -> Self
pub fn global_scope(self, global: &GlobalScope<Arch, Tls>) -> Self
Uses a LinkContext global symbol scope.
The shared handle is retained only for the relocation run. Deferred binding stores a weak reference and therefore does not keep the context or unrelated global modules alive.
Sourcepub fn modules<I, R>(self, modules: I) -> Self
pub fn modules<I, R>(self, modules: I) -> Self
Uses the same ordered modules for eager and deferred symbol lookup.
Sourcepub fn local_scope(self, scope: LocalScope<Arch, Tls>) -> Self
pub fn local_scope(self, scope: LocalScope<Arch, Tls>) -> Self
Replaces the complete eager and deferred symbol lookup scope.
Source§impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
Source§impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>where
Arch: RelocationArch,
Tls: TlsResolver<Arch>,
Obs: RelocationObserver<Arch>,
Binder: LazyBinder<Arch>,
impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>where
Arch: RelocationArch,
Tls: TlsResolver<Arch>,
Obs: RelocationObserver<Arch>,
Binder: LazyBinder<Arch>,
Trait Implementations§
Source§impl<'cfg, T, Arch, Obs, Tls, Binder> Clone for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch, Obs, Tls, Binder> Clone for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
Auto Trait Implementations§
impl<'cfg, T, Arch = X86_64Arch, Obs = (), Tls = (), Binder = ()> !RefUnwindSafe for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch = X86_64Arch, Obs = (), Tls = (), Binder = ()> !UnwindSafe for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch, Obs, Tls, Binder> Freeze for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch, Obs, Tls, Binder> Send for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch, Obs, Tls, Binder> Sync for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch, Obs, Tls, Binder> Unpin for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>
impl<'cfg, T, Arch, Obs, Tls, Binder> UnsafeUnpin for RelocatorRun<'cfg, T, Arch, Obs, Tls, Binder>where
T: UnsafeUnpin,
LocalScope<Arch, Tls>: UnsafeUnpin,
Option<GlobalScope<Arch, Tls>>: UnsafeUnpin,
Obs: UnsafeUnpin,
Option<Arc<SymbolRegistry<Arch, Tls>>>: UnsafeUnpin,
&'cfg Relocator<Binder>: 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