#[repr(C)]pub struct Library {
pub name: String,
pub full_obj: Backing,
pub backings: Vec<Backing>,
pub tls_id: Option<TlsModId>,
/* private fields */
}
Expand description
A loaded library. It may be in various relocation states.
Fields§
§name: String
Name of this library.
full_obj: Backing
Object containing the full ELF data.
backings: Vec<Backing>
§tls_id: Option<TlsModId>
The module ID for the TLS region, if any.
Implementations§
source§impl Library
impl Library
sourcepub fn compartment(&self) -> CompartmentId
pub fn compartment(&self) -> CompartmentId
Get the compartment ID for this library.
sourcepub fn get_phdrs_raw(&self) -> Option<(*const Elf64_Phdr, usize)>
pub fn get_phdrs_raw(&self) -> Option<(*const Elf64_Phdr, usize)>
Get a raw pointer to the program headers for this library.
sourcepub fn get_elf(&self) -> Result<ElfBytes<'_, NativeEndian>, ParseError>
pub fn get_elf(&self) -> Result<ElfBytes<'_, NativeEndian>, ParseError>
Return a handle to the full ELF file.
sourcepub fn laddr<T>(&self, val: u64) -> *const T
pub fn laddr<T>(&self, val: u64) -> *const T
Compute an in-memory address for a ELF virtual addr.
sourcepub fn laddr_mut<T>(&self, val: u64) -> *mut T
pub fn laddr_mut<T>(&self, val: u64) -> *mut T
Compute an in-memory address (mut) for a ELF virtual addr.
sourcepub fn get_entry_address(
&self
) -> Result<extern "C" fn(_: *const AuxEntry) -> !, DynlinkError>
pub fn get_entry_address( &self ) -> Result<extern "C" fn(_: *const AuxEntry) -> !, DynlinkError>
Get a function pointer to this library’s entry address, if one exists.
pub fn iter_secgates(&self) -> Option<&[RawSecGateInfo]>
Trait Implementations§
Auto Trait Implementations§
impl !Crossing for Library
impl !ObjSafe for Library
impl RefUnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin for Library
impl UnwindSafe for Library
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