|
LIEF: Library to Instrument Executable Formats Version 1.0.0
|
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used to get a LIEF::PE::Binary. More...
#include <Parser.hpp>


Public Member Functions | |
| Parser & | operator= (const Parser ©)=delete |
| Parser (const Parser ©)=delete | |
| COFF::String * | find_coff_string (uint32_t offset) const |
| ExceptionInfo * | find_exception_info (uint32_t rva) const |
| const Binary & | bin () const |
| Binary & | bin () |
| BinaryStream & | stream () |
| const ParserConfig & | config () const |
| void | memoize (ExceptionInfo &info) |
| void | memoize (COFF::String str) |
| void | add_non_resolved (ExceptionInfo &info, uint32_t target) |
| std::unique_ptr< SpanStream > | stream_from_rva (uint32_t rva, size_t size=0) |
| void | record_relocation (uint32_t rva, span< const uint8_t > data) |
| ok_error_t | record_delta_relocation (uint32_t rva, int64_t delta, size_t size) |
Static Public Member Functions | |
| static bool | is_valid_import_name (const std::string &name) |
| Check if the given name is a valid import. | |
| static bool | is_valid_dll_name (const std::string &name) |
| Check if the given name is a valid DLL name. | |
| static std::unique_ptr< Binary > | parse (const std::string &filename, const ParserConfig &conf=ParserConfig::default_conf()) |
| Parse a PE binary from the given filename. | |
| static std::unique_ptr< Binary > | parse (std::vector< uint8_t > data, const ParserConfig &conf=ParserConfig::default_conf()) |
| Parse a PE binary from a data buffer. | |
| static std::unique_ptr< Binary > | parse (const uint8_t *buffer, size_t size, const ParserConfig &conf=ParserConfig::default_conf()) |
| static std::unique_ptr< Binary > | parse (std::unique_ptr< BinaryStream > stream, const ParserConfig &conf=ParserConfig::default_conf()) |
| Parse a PE binary from the given BinaryStream. | |
| Static Public Member Functions inherited from LIEF::Parser | |
| static std::unique_ptr< Binary > | parse (const std::string &filename) |
| Construct an LIEF::Binary from the given filename. | |
| static std::unique_ptr< Binary > | parse (const std::vector< uint8_t > &raw) |
| Construct an LIEF::Binary from the given raw data. | |
| static std::unique_ptr< Binary > | parse (std::unique_ptr< BinaryStream > stream) |
| Construct an LIEF::Binary from the given stream. | |
Static Public Attributes | |
| static constexpr size_t | MAX_DATA_SIZE = 3_GB |
| Maximum size of the data read. | |
| static constexpr size_t | MAX_TLS_CALLBACKS = 3000 |
| static constexpr size_t | MAX_DLL_NAME_SIZE = 255 |
| static constexpr size_t | MAX_PADDING_SIZE = 1_GB |
| Max size of the padding section. | |
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used to get a LIEF::PE::Binary.
|
delete |
References Parser().
Referenced by operator=(), and Parser().
|
inline |
|
inline |
|
inline |
|
inline |
| COFF::String * LIEF::PE::Parser::find_coff_string | ( | uint32_t | offset | ) | const |
|
inline |
|
static |
Check if the given name is a valid DLL name.
This check verifies that:
|
static |
Check if the given name is a valid import.
This check verified that:
| void LIEF::PE::Parser::memoize | ( | COFF::String | str | ) |
| void LIEF::PE::Parser::memoize | ( | ExceptionInfo & | info | ) |
|
static |
Parse a PE binary from the given filename.
References LIEF::PE::ParserConfig::default_conf().
|
static |
References LIEF::PE::ParserConfig::default_conf().
|
static |
Parse a PE binary from the given BinaryStream.
References LIEF::PE::ParserConfig::default_conf(), and stream().
|
static |
Parse a PE binary from a data buffer.
References LIEF::PE::ParserConfig::default_conf().
| ok_error_t LIEF::PE::Parser::record_delta_relocation | ( | uint32_t | rva, |
| int64_t | delta, | ||
| size_t | size ) |
| void LIEF::PE::Parser::record_relocation | ( | uint32_t | rva, |
| span< const uint8_t > | data ) |
|
inline |
Referenced by parse().
| std::unique_ptr< SpanStream > LIEF::PE::Parser::stream_from_rva | ( | uint32_t | rva, |
| size_t | size = 0 ) |
|
staticconstexpr |
Maximum size of the data read.
|
staticconstexpr |
|
staticconstexpr |
Max size of the padding section.
|
staticconstexpr |