pub enum Elf {
Dylib(ElfDylib),
Exec(ElfExec),
}
Expand description
An unrelocated elf file
Variants§
Implementations§
Source§impl Elf
impl Elf
Sourcepub fn easy_relocate<'iter, 'scope, 'find, 'lib, F>(
self,
scope: impl IntoIterator<Item = &'iter RelocatedDylib<'scope>>,
pre_find: &'find F,
) -> Result<RelocatedElf<'lib>>
pub fn easy_relocate<'iter, 'scope, 'find, 'lib, F>( self, scope: impl IntoIterator<Item = &'iter RelocatedDylib<'scope>>, pre_find: &'find F, ) -> Result<RelocatedElf<'lib>>
Relocate the elf 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, F>(
self,
scope: impl AsRef<[&'iter RelocatedDylib<'scope>]>,
pre_find: &'find F,
deal_unknown: &mut dyn FnMut(&ElfRelType, &CoreComponent, &[&RelocatedDylib<'_>]) -> Result<(), Box<dyn Any + Send + Sync>>,
local_lazy_scope: Option<Arc<dyn for<'a> Fn(&'a str) -> Option<*const ()> + 'lib>>,
) -> Result<RelocatedElf<'lib>>
pub fn relocate<'iter, 'scope, 'find, 'lib, F>( self, scope: impl AsRef<[&'iter RelocatedDylib<'scope>]>, pre_find: &'find F, deal_unknown: &mut dyn FnMut(&ElfRelType, &CoreComponent, &[&RelocatedDylib<'_>]) -> Result<(), Box<dyn Any + Send + Sync>>, local_lazy_scope: Option<Arc<dyn for<'a> Fn(&'a str) -> Option<*const ()> + 'lib>>, ) -> Result<RelocatedElf<'lib>>
Relocate the elf 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_unknown
function 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 Elf
impl !RefUnwindSafe for Elf
impl !Send for Elf
impl !Sync for Elf
impl Unpin for Elf
impl !UnwindSafe for Elf
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