Struct lief::dsc::dylib::ExtractOpt

pub struct ExtractOpt {
    pub pack: bool,
    pub fix_branches: bool,
    pub fix_memory: bool,
    pub fix_relocations: bool,
    pub fix_objc: bool,
    pub create_dyld_chained_fixup_cmd: Option<bool>,
}
Expand description

This structure is used to tweak the extraction process while calling Dylib::get_with_opt. These options allow to deoptimize the dylib and get an accurate representation of the origin Mach-O binary.

Fields§

§pack: bool

Whether the segment’s offsets should be packed to avoid an in-memory size while writing back the binary.

This option does not have an impact on the performances
§fix_branches: bool

Fix call instructions that target addresses outside the current dylib virtual space.

Enabling this option can have a significant impact on the performances. Make sure to enable the internal cache mechanism.

crate::dsc::enable_cache or crate::dsc::DyldSharedCache::enable_caching

§fix_memory: bool

Fix memory accesses performed outside the dylib’s virtual space

Enabling this option can have a significant impact on the performances. Make sure to enable the internal cache mechanism.

crate::dsc::enable_cache or crate::dsc::DyldSharedCache::enable_caching

§fix_relocations: bool

Recover and fix relocations

Enabling this option can have a significant impact on the performances. Make sure to enable the internal cache mechanism.

crate::dsc::enable_cache or crate::dsc::DyldSharedCache::enable_caching

§fix_objc: bool

Fix Objective-C information

Enabling this option can have a significant impact on the performances. Make sure to enable the internal cache mechanism.

crate::dsc::enable_cache or crate::dsc::DyldSharedCache::enable_caching

§create_dyld_chained_fixup_cmd: Option<bool>

Whether the LC_DYLD_CHAINED_FIXUPS command should be (re)created.

If this value is not set, LIEF will add the command only if it’s meaningful regarding the other options

Trait Implementations§

§

impl Default for ExtractOpt

§

fn default() -> ExtractOpt

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.