Go to the documentation of this file.
16#ifndef LIEF_MACHO_PARSER_H
17#define LIEF_MACHO_PARSER_H
48 static std::unique_ptr<FatBinary>
parse(
const std::string& filename,
58 const ParserConfig& conf = ParserConfig::deep());
59 static std::unique_ptr<FatBinary>
parse(
const std::vector<uint8_t>& data,
69 const ParserConfig& conf = ParserConfig::deep());
71 static std::unique_ptr<FatBinary>
parse(std::unique_ptr<BinaryStream> stream,
74 const ParserConfig& conf = ParserConfig::deep());
78 const ParserConfig& conf = ParserConfig::deep());
79 static std::unique_ptr<FatBinary>
parse_from_memory(uintptr_t address,
size_t size,
83 const ParserConfig& conf = ParserConfig::deep());
86 LIEF_LOCAL Parser(
const std::string& file,
const ParserConfig& conf);
87 LIEF_LOCAL Parser(std::vector<uint8_t> data,
const ParserConfig& conf);
95 std::unique_ptr<BinaryStream> stream_;
96 std::vector<std::unique_ptr<Binary>> binaries_;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
Class which represents a MachO binary.
Definition MachO/Binary.hpp:86
Class which represent a Mach-O (fat) binary This object is also used for representing Mach-O binaries...
Definition FatBinary.hpp:36
The main interface to parse a Mach-O binary.
Definition MachO/Parser.hpp:42
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 secon...
Parser(const Parser ©)=delete
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(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.
Parser & operator=(const Parser ©)=delete
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.
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:36
result< ok_t > ok_error_t
Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead,...
Definition errors.hpp:109
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42