Skip to main content

RelocatorRun

Struct RelocatorRun 

Source
pub struct RelocatorRun<'cfg, T, Arch: RelocationArch = NativeArch, Obs = (), Tls: TlsResolver<Arch> = (), ScopeState = ModuleScopeBuilder<Arch, Tls>, 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, ScopeState, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where Arch: RelocationArch, Tls: TlsResolver<Arch>, Binder: LazyBinder<Arch>,

Source

pub fn observer<NewObs>( self, observer: NewObs, ) -> RelocatorRun<'cfg, T, Arch, NewObs, Tls, ScopeState, Binder>
where NewObs: RelocationObserver<Arch>,

Sets the runtime-linker observer used during relocation.

Source

pub fn binding(self, binding: BindingMode) -> Self

Overrides the relocation binding mode.

Source

pub fn set_binding(&mut self, binding: BindingMode)

Updates the relocation binding mode in place.

Source§

impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, ModuleScopeBuilder<Arch, Tls>, Binder>
where Arch: RelocationArch, Tls: TlsResolver<Arch>, Binder: LazyBinder<Arch>,

Source

pub fn scope<I, R>(self, scope: I) -> Self
where I: IntoIterator<Item = R>, R: Into<ModuleHandle<Arch, Tls>>,

Replaces the current module scope used for symbol resolution.

Source

pub fn shared_scope( self, scope: ModuleScope<Arch, Tls>, ) -> RelocatorRun<'cfg, T, Arch, Obs, Tls, ModuleScope<Arch, Tls>, Binder>

Replaces the current module scope with a shared scope owner.

Source

pub fn extend_scope<I, R>(self, scope: I) -> Self
where I: IntoIterator<Item = R>, R: Into<ModuleHandle<Arch, Tls>>,

Appends more modules to the symbol-resolution scope.

Source§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where T: SupportLazy, Arch: RelocationArch, Tls: TlsResolver<Arch>, Binder: LazyBinder<Arch>,

Source

pub fn eager(self) -> Self

Forces eager binding.

Source

pub fn lazy(self) -> Self

Forces lazy binding.

Source§

impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, ModuleScopeBuilder<Arch, Tls>, Binder>
where Arch: RelocationArch, Tls: TlsResolver<Arch>, Obs: RelocationObserver<Arch>, Binder: LazyBinder<Arch>,

Source

pub fn relocate<D>(self) -> Result<<T as Relocatable<D>>::Output>
where D: 'static, T: Relocatable<D, Arch = Arch, Tls = Tls>,

Executes relocation with the current run state.

Source§

impl<'cfg, T, Arch, Obs, Tls, Binder> RelocatorRun<'cfg, T, Arch, Obs, Tls, ModuleScope<Arch, Tls>, Binder>
where Arch: RelocationArch, Tls: TlsResolver<Arch>, Obs: RelocationObserver<Arch>, Binder: LazyBinder<Arch>,

Source

pub fn relocate<D>(self) -> Result<<T as Relocatable<D>>::Output>
where D: 'static, T: Relocatable<D, Arch = Arch, Tls = Tls>,

Executes relocation with the current run state.

Trait Implementations§

Source§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> Clone for RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where Arch: RelocationArch, Tls: TlsResolver<Arch>, T: Clone, ScopeState: Clone, Obs: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> Freeze for RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where T: Freeze, ScopeState: Freeze, Obs: Freeze,

§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> RefUnwindSafe for RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where T: RefUnwindSafe, ScopeState: RefUnwindSafe, Obs: RefUnwindSafe, Binder: RefUnwindSafe,

§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> Send for RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where T: Send, ScopeState: Send, Obs: Send, Binder: Sync,

§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> Sync for RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where T: Sync, ScopeState: Sync, Obs: Sync, Binder: Sync,

§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> Unpin for RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where T: Unpin, ScopeState: Unpin, Obs: Unpin,

§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> UnsafeUnpin for RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where T: UnsafeUnpin, ScopeState: UnsafeUnpin, Obs: UnsafeUnpin,

§

impl<'cfg, T, Arch, Obs, Tls, ScopeState, Binder> UnwindSafe for RelocatorRun<'cfg, T, Arch, Obs, Tls, ScopeState, Binder>
where T: UnwindSafe, ScopeState: UnwindSafe, Obs: UnwindSafe, Binder: RefUnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.