LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::MachO::ParserConfig Struct Reference

This structure is used to tweak the MachO Parser (MachO::Parser) More...

#include <ParserConfig.hpp>

Public Member Functions

ParserConfigfull_dyldinfo (bool flag)
 If flag is set to true, Exports, Bindings and Rebases opcodes are parsed.
 

Static Public Member Functions

static ParserConfig deep ()
 Return a parser configuration such as all the objects supported by LIEF are parsed.
 
static ParserConfig quick ()
 Return a configuration to parse the most important MachO structures.
 

Public Attributes

bool parse_dyld_exports = true
 Parse the Dyld export trie.
 
bool parse_dyld_bindings = true
 Parse the Dyld binding opcodes.
 
bool parse_dyld_rebases = true
 Parse the Dyld rebase opcodes.
 
bool parse_overlay = true
 Whether the overlay data should be parsed.
 
bool fix_from_memory = false
 When parsing Mach-O from memory, this option can be used to undo relocations and symbols bindings.
 
bool from_dyld_shared_cache = false
 Whether the binary is coming/extracted from Dyld shared cache.
 

Detailed Description

This structure is used to tweak the MachO Parser (MachO::Parser)

Member Function Documentation

◆ deep()

static ParserConfig LIEF::MachO::ParserConfig::deep ( )
static

Return a parser configuration such as all the objects supported by LIEF are parsed.

◆ full_dyldinfo()

ParserConfig & LIEF::MachO::ParserConfig::full_dyldinfo ( bool flag)

If flag is set to true, Exports, Bindings and Rebases opcodes are parsed.

Warning
Enabling this flag can slow down the parsing

◆ quick()

static ParserConfig LIEF::MachO::ParserConfig::quick ( )
static

Return a configuration to parse the most important MachO structures.

Member Data Documentation

◆ fix_from_memory

bool LIEF::MachO::ParserConfig::fix_from_memory = false

When parsing Mach-O from memory, this option can be used to undo relocations and symbols bindings.

When activated, this option requires parse_dyld_bindings and parse_dyld_rebases to be enabled.

◆ from_dyld_shared_cache

bool LIEF::MachO::ParserConfig::from_dyld_shared_cache = false

Whether the binary is coming/extracted from Dyld shared cache.

◆ parse_dyld_bindings

bool LIEF::MachO::ParserConfig::parse_dyld_bindings = true

Parse the Dyld binding opcodes.

◆ parse_dyld_exports

bool LIEF::MachO::ParserConfig::parse_dyld_exports = true

Parse the Dyld export trie.

◆ parse_dyld_rebases

bool LIEF::MachO::ParserConfig::parse_dyld_rebases = true

Parse the Dyld rebase opcodes.

◆ parse_overlay

bool LIEF::MachO::ParserConfig::parse_overlay = true

Whether the overlay data should be parsed.


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