LIEF: Library to Instrument Executable Formats Version 0.15.1
|
The main interface to parse a Mach-O binary. More...
#include <Parser.hpp>
Public Member Functions | |
Parser & | operator= (const Parser ©)=delete |
Parser (const Parser ©)=delete | |
~Parser () override | |
Static Public Member Functions | |
static std::unique_ptr< FatBinary > | parse (const std::string &filename, const ParserConfig &conf=ParserConfig::deep()) |
Parse a Mach-O file from the path provided by the filename parameter. | |
static std::unique_ptr< FatBinary > | parse (const std::vector< uint8_t > &data, const ParserConfig &conf=ParserConfig::deep()) |
Parse a Mach-O file from the raw content provided by the data parameter. | |
static std::unique_ptr< FatBinary > | parse (std::unique_ptr< BinaryStream > stream, const ParserConfig &conf=ParserConfig::deep()) |
Parser a Mach-O binary from the provided BinaryStream. | |
static std::unique_ptr< FatBinary > | parse_from_memory (uintptr_t address, const ParserConfig &conf=ParserConfig::deep()) |
Parse the Mach-O binary from the address given in the first parameter. | |
static std::unique_ptr< FatBinary > | parse_from_memory (uintptr_t address, size_t size, const ParserConfig &conf=ParserConfig::deep()) |
Parse the Mach-O binary from the address given in the first parameter and the size given in the second parameter. | |
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. | |
The main interface to parse a Mach-O binary.
This class is used to parse both Fat & non-Fat binary. Non-fat binaries are considerated as a fat with only one architecture. This is why MachO::Parser::parse outputs a FatBinary object.
|
delete |
|
overridevirtual |
Reimplemented from LIEF::Parser.
|
static |
Parse a Mach-O file from the path provided by the filename
parameter.
The conf
parameter can be used to tweak the configuration of the parser
[in] | filename | Path to the Mach-O file |
[in] | conf | Parser configuration (Defaut: ParserConfig::deep) |
|
static |
Parse a Mach-O file from the raw content provided by the data
parameter.
The conf
parameter can be used to tweak the configuration of the parser
[in] | data | Mach-O file as a vector of bytes |
[in] | conf | Parser configuration (Defaut: ParserConfig::deep) |
|
static |
Parser a Mach-O binary from the provided BinaryStream.
|
static |
Parse the Mach-O binary from the address given in the first parameter.
|
static |
Parse the Mach-O binary from the address given in the first parameter and the size given in the second parameter.