lief::macho::commands::lazy_load_dylib_info

Struct LazyLoadDylibInfo

pub struct LazyLoadDylibInfo<'a> { /* private fields */ }
Expand description

Class representing the LC_LAZY_LOAD_DYLIB_INFO load command.

This command describes how to lazily load a dylib: instead of binding the library and its symbols at launch time, dyld keeps the information required to resolve the dylib on the first use of one of its symbols.

Implementations§

§

impl LazyLoadDylibInfo<'_>

pub fn data_offset(&self) -> u32

Offset in the __LINKEDIT segment where the payload is located

pub fn data_size(&self) -> u32

Size of the payload

pub fn content(&self) -> &[u8]

Raw payload as a slice of bytes

pub fn load_path(&self) -> String

Load path of the dylib to bind lazily

pub fn flag_image_offset(&self) -> u32

Image offset of the global flag that is set once the dylib has been loaded by dyld

pub fn flags(&self) -> u16

Raw flags associated with this command (see LazyLoadDylibInfo::may_be_missing)

pub fn may_be_missing(&self) -> bool

Whether the dylib is allowed to be missing at runtime (weak linked)

pub fn pointer_format(&self) -> u16

Chained-fixups pointer format used by the binding chain

pub fn chain_start_image_offset(&self) -> u32

Image offset of the fixup chain start used to bind the dylib’s symbols

pub fn symbols(&self) -> Vec<String>

List of the symbol names to bind lazily for this dylib

pub fn fixups(&self) -> Fixups<'_>

Iterator over the lazy-binding Fixup entries

pub fn set_load_path(&mut self, value: &str)

Change the load path of the dylib to bind lazily. The new path is serialized into the payload when the binary is rebuilt.

pub fn set_flag_image_offset(&mut self, value: u32)

Set the image offset of the global “loaded” flag.

pub fn set_flags(&mut self, value: u16)

Set the raw flags associated with this command.

pub fn set_may_be_missing(&mut self, value: bool)

Set or clear the “may be missing” (weak linked) flag bit.

pub fn set_pointer_format(&mut self, value: u16)

Set the chained-fixups pointer format used by the binding chain.

pub fn set_chain_start_image_offset(&mut self, value: u32)

Set the image offset of the fixup chain start.

pub fn add_symbol(&mut self, value: &str)

Append a symbol name to the list of symbols to bind lazily.

pub fn set_symbols(&mut self, symbols: &[&str])

Replace the list of symbol names to bind lazily. The new list is serialized into the payload when the binary is rebuilt.

Trait Implementations§

§

impl Command for LazyLoadDylibInfo<'_>

§

fn size(&self) -> u32

Size of the command (should be greater than sizeof(load_command))
§

fn offset(&self) -> u64

Offset of the command within the Load Command Table
§

fn command_type(&self) -> LoadCommandTypes

The command’s type
§

fn data(&self) -> &[u8]

The raw command as a slice of bytes
§

impl Debug for LazyLoadDylibInfo<'_>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for LazyLoadDylibInfo<'a>

§

impl<'a> RefUnwindSafe for LazyLoadDylibInfo<'a>

§

impl<'a> !Send for LazyLoadDylibInfo<'a>

§

impl<'a> !Sync for LazyLoadDylibInfo<'a>

§

impl<'a> Unpin for LazyLoadDylibInfo<'a>

§

impl<'a> UnwindSafe for LazyLoadDylibInfo<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.