pub struct ElfExec { /* private fields */ }Expand description
An unrelocated executable file
Implementations§
Source§impl ElfExec
impl ElfExec
Sourcepub fn easy_relocate<'iter, 'scope, 'find, 'lib, S, F>(
self,
scope: S,
pre_find: &'find F,
) -> Result<RelocatedExec<'lib>>
pub fn easy_relocate<'iter, 'scope, 'find, 'lib, S, F>( self, scope: S, pre_find: &'find F, ) -> Result<RelocatedExec<'lib>>
Relocate the executable file with the given dynamic libraries and function closure.
§Note
During relocation, the symbol is first searched in the function closure pre_find.
Sourcepub fn relocate<'iter, 'scope, 'find, 'lib, S, F, D>(
self,
scope: S,
pre_find: &'find F,
deal_unknown: D,
local_lazy_scope: Option<Arc<dyn for<'a> Fn(&'a str) -> Option<*const ()> + 'lib>>,
) -> Result<RelocatedExec<'lib>>where
S: Iterator<Item = &'iter RelocatedDylib<'scope>> + Clone,
F: Fn(&str) -> Option<*const ()>,
D: Fn(&ElfRelType, &CoreComponent, S) -> Result<(), Box<dyn Any>>,
'scope: 'iter,
'iter: 'lib,
'find: 'lib,
pub fn relocate<'iter, 'scope, 'find, 'lib, S, F, D>(
self,
scope: S,
pre_find: &'find F,
deal_unknown: D,
local_lazy_scope: Option<Arc<dyn for<'a> Fn(&'a str) -> Option<*const ()> + 'lib>>,
) -> Result<RelocatedExec<'lib>>where
S: Iterator<Item = &'iter RelocatedDylib<'scope>> + Clone,
F: Fn(&str) -> Option<*const ()>,
D: Fn(&ElfRelType, &CoreComponent, S) -> Result<(), Box<dyn Any>>,
'scope: 'iter,
'iter: 'lib,
'find: 'lib,
Relocate the executable file with the given dynamic libraries and function closure.
§Note
- During relocation, the symbol is first searched in the function closure
pre_find. - The
deal_unknownfunction is used to handle relocation types not implemented by efl_loader or failed relocations - relocation will be done in the exact order in which the dynamic libraries appear in
scope. - When lazy binding, the symbol is first looked for in the global scope and then in the local lazy scope
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ElfExec
impl !RefUnwindSafe for ElfExec
impl !Send for ElfExec
impl !Sync for ElfExec
impl Unpin for ElfExec
impl !UnwindSafe for ElfExec
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