pub trait ContextEngine {
// Required methods
fn load_segments(
&mut self,
src: &Backing,
ld: &[LoadDirective],
comp_id: CompartmentId,
load_ctx: &mut LoadCtx,
) -> Result<Vec<Backing>, DynlinkError>;
fn load_object(
&mut self,
unlib: &UnloadedLibrary,
) -> Result<Backing, DynlinkError>;
fn select_compartment(
&mut self,
unlib: &UnloadedLibrary,
) -> Option<CompartmentId>;
}
Expand description
System-specific implementation functions for the dynamic linker, mostly involving loading objects.
Required Methods§
Sourcefn load_segments(
&mut self,
src: &Backing,
ld: &[LoadDirective],
comp_id: CompartmentId,
load_ctx: &mut LoadCtx,
) -> Result<Vec<Backing>, DynlinkError>
fn load_segments( &mut self, src: &Backing, ld: &[LoadDirective], comp_id: CompartmentId, load_ctx: &mut LoadCtx, ) -> Result<Vec<Backing>, DynlinkError>
Load a given source backing into new backings, according to the given load directives.
Sourcefn load_object(
&mut self,
unlib: &UnloadedLibrary,
) -> Result<Backing, DynlinkError>
fn load_object( &mut self, unlib: &UnloadedLibrary, ) -> Result<Backing, DynlinkError>
Load a single object, based on the given unloaded library.
Sourcefn select_compartment(
&mut self,
unlib: &UnloadedLibrary,
) -> Option<CompartmentId>
fn select_compartment( &mut self, unlib: &UnloadedLibrary, ) -> Option<CompartmentId>
Select which compartment a library should go in.