pub struct ElfDylib { /* private fields */ }Expand description
An unrelocated dynamic library
Implementations§
Source§impl ElfDylib
impl ElfDylib
Sourcepub fn relocate<'scope, S, F, D>(
self,
scope: S,
find: &'scope F,
deal_unknown: D,
lazy_scope: Option<Box<dyn for<'a> Fn(&'a str) -> Option<*const ()> + 'static>>,
) -> Result<RelocatedDylib<'scope>>
pub fn relocate<'scope, S, F, D>( self, scope: S, find: &'scope F, deal_unknown: D, lazy_scope: Option<Box<dyn for<'a> Fn(&'a str) -> Option<*const ()> + 'static>>, ) -> Result<RelocatedDylib<'scope>>
Relocate the dynamic library with the given dynamic libraries and function closure.
§Note
- During relocation, it is preferred to look for symbols in function closures
find. - The
deal_unknownfunction is used to handle relocation types not implemented by efl_loader or failed relocations - Typically, the
scopeshould also contain the current dynamic library itself, relocation will be done in the exact order in which the dynamic libraries appear inscope. - When lazy binding, the symbol is first looked for in the global scope and then in the lazy scope
Source§impl ElfDylib
impl ElfDylib
Sourcepub fn dyn_relocation(&self) -> Option<&[ElfRela]>
pub fn dyn_relocation(&self) -> Option<&[ElfRela]>
Gets rela.dyn section content
Sourcepub fn plt_relocation(&self) -> Option<&[ElfRela]>
pub fn plt_relocation(&self) -> Option<&[ElfRela]>
Gets rela.plt section content
Sourcepub unsafe fn core_component_ref(&self) -> &CoreComponent
pub unsafe fn core_component_ref(&self) -> &CoreComponent
Gets the core component reference of the elf object
§Safety
The current elf object has not yet been relocated, so it is dangerous to use this
function to get CoreComponent in the elf object.
Sourcepub unsafe fn core_component(&self) -> CoreComponent
pub unsafe fn core_component(&self) -> CoreComponent
Gets the core component of the elf object
§Safety
The current elf object has not yet been relocated, so it is dangerous to use this
function to get CoreComponent in the elf object.
Sourcepub fn needed_libs(&self) -> &[&'static str]
pub fn needed_libs(&self) -> &[&'static str]
Gets the name of the elf object
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ElfDylib
impl !RefUnwindSafe for ElfDylib
impl !Send for ElfDylib
impl !Sync for ElfDylib
impl Unpin for ElfDylib
impl !UnwindSafe for ElfDylib
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