LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::dsc::Dylib::extract_opt_t Struct Reference

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

#include <Dylib.hpp>

Public Member Functions

 extract_opt_t ()
 

Public Attributes

bool pack = true
 Whether the segment's offsets should be packed to avoid an in-memory size while writing back the binary.
 
bool fix_branches = false
 Fix call instructions that target addresses outside the current dylib virtual space.
 
bool fix_memory = false
 Fix memory accesses performed outside the dylib's virtual space.
 
bool fix_relocations = false
 Recover and fix relocations.
 
bool fix_objc = false
 Fix Objective-C information.
 
LIEF::result< bool > create_dyld_chained_fixup_cmd
 Whether the LC_DYLD_CHAINED_FIXUPS command should be (re)created.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ extract_opt_t()

LIEF::dsc::Dylib::extract_opt_t::extract_opt_t ( )

Member Data Documentation

◆ create_dyld_chained_fixup_cmd

LIEF::result<bool> LIEF::dsc::Dylib::extract_opt_t::create_dyld_chained_fixup_cmd

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

◆ fix_branches

bool LIEF::dsc::Dylib::extract_opt_t::fix_branches = false

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

Warning
Enabling this option can have a significant impact on the performances. Make sure to enable the internal cache mechanism: LIEF::dsc::enable_cache or LIEF::dsc::DyldSharedCache::enable_caching

◆ fix_memory

bool LIEF::dsc::Dylib::extract_opt_t::fix_memory = false

Fix memory accesses performed outside the dylib's virtual space.

Warning
Enabling this option can have a significant impact on the performances. Make sure to enable the internal cache mechanism: LIEF::dsc::enable_cache or LIEF::dsc::DyldSharedCache::enable_caching

◆ fix_objc

bool LIEF::dsc::Dylib::extract_opt_t::fix_objc = false

Fix Objective-C information.

◆ fix_relocations

bool LIEF::dsc::Dylib::extract_opt_t::fix_relocations = false

Recover and fix relocations.

Warning
Enabling this option can have a significant impact on the performances. Make sure to enable the internal cache mechanism: LIEF::dsc::enable_cache or LIEF::dsc::DyldSharedCache::enable_caching

◆ pack

bool LIEF::dsc::Dylib::extract_opt_t::pack = true

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

Note
This option does not have an impact on the performances

The documentation for this struct was generated from the following file: