LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::Builder::config_t Struct Reference

This structure is used to configure the build operation. More...

#include <Builder.hpp>

Public Types

using resolved_iat_cbk_t
 

Public Attributes

bool imports = false
 Whether the builder should reconstruct the imports table. This option should be turned on if you modify imports.
 
bool exports = false
 Whether the builder should reconstruct the export table This option should be turned on if you modify exports.
 
bool resources = true
 Whether the builder should regenerate the resources tree.
 
bool relocations = true
 Whether the builder should regenerate relocations.
 
bool load_configuration = true
 Whether the builder should regenerate the load config.
 
bool tls = true
 Whether the builder should regenerate the TLS info.
 
bool overlay = true
 Whether the builder should write back any overlay data.
 
bool debug = true
 Whether the builder should regenerate debug entries.
 
bool dos_stub = true
 Whether the builder should write back dos stub (including the rich header)
 
std::string rsrc_section = ".rsrc"
 If the resources tree needs to be relocated, this defines the name of the new section that contains the relocated tree.
 
std::string idata_section = ".idata"
 Section that holds the relocated import table (IAT/ILT)
 
std::string tls_section = ".tls"
 Section that holds the relocated TLS info.
 
std::string reloc_section = ".reloc"
 Section that holds the relocated relocations.
 
std::string export_section = ".edata"
 Section that holds the export table.
 
std::string debug_section = ".debug"
 Section that holds the debug entries.
 
resolved_iat_cbk_t resolved_iat_cbk = nullptr
 

Detailed Description

This structure is used to configure the build operation.

The default value of these attributes is set to false if the operation modifies the binary layout even though nothing changed. For instance, building the import table always requires relocating the table to another place. Thus, the default value is false and must be explicitly set to true.

Member Typedef Documentation

◆ resolved_iat_cbk_t

Initial value:
std::function<void(Binary*, const Import*, const ImportEntry*, uint32_t)>

Member Data Documentation

◆ debug

bool LIEF::PE::Builder::config_t::debug = true

Whether the builder should regenerate debug entries.

◆ debug_section

std::string LIEF::PE::Builder::config_t::debug_section = ".debug"

Section that holds the debug entries.

◆ dos_stub

bool LIEF::PE::Builder::config_t::dos_stub = true

Whether the builder should write back dos stub (including the rich header)

◆ export_section

std::string LIEF::PE::Builder::config_t::export_section = ".edata"

Section that holds the export table.

◆ exports

bool LIEF::PE::Builder::config_t::exports = false

Whether the builder should reconstruct the export table This option should be turned on if you modify exports.

Please check LIEF website for more details

◆ idata_section

std::string LIEF::PE::Builder::config_t::idata_section = ".idata"

Section that holds the relocated import table (IAT/ILT)

◆ imports

bool LIEF::PE::Builder::config_t::imports = false

Whether the builder should reconstruct the imports table. This option should be turned on if you modify imports.

Please check LIEF website for more details

◆ load_configuration

bool LIEF::PE::Builder::config_t::load_configuration = true

Whether the builder should regenerate the load config.

◆ overlay

bool LIEF::PE::Builder::config_t::overlay = true

Whether the builder should write back any overlay data.

◆ reloc_section

std::string LIEF::PE::Builder::config_t::reloc_section = ".reloc"

Section that holds the relocated relocations.

◆ relocations

bool LIEF::PE::Builder::config_t::relocations = true

Whether the builder should regenerate relocations.

◆ resolved_iat_cbk

resolved_iat_cbk_t LIEF::PE::Builder::config_t::resolved_iat_cbk = nullptr

◆ resources

bool LIEF::PE::Builder::config_t::resources = true

Whether the builder should regenerate the resources tree.

◆ rsrc_section

std::string LIEF::PE::Builder::config_t::rsrc_section = ".rsrc"

If the resources tree needs to be relocated, this defines the name of the new section that contains the relocated tree.

◆ tls

bool LIEF::PE::Builder::config_t::tls = true

Whether the builder should regenerate the TLS info.

◆ tls_section

std::string LIEF::PE::Builder::config_t::tls_section = ".tls"

Section that holds the relocated TLS info.


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