16#ifndef LIEF_OAT_PARSER_H
17#define LIEF_OAT_PARSER_H
41 static std::unique_ptr<Binary>
parse(
const std::string& oat_file);
42 static std::unique_ptr<Binary>
parse(
const std::string& oat_file,
43 const std::string& vdex_file);
45 static std::unique_ptr<Binary>
parse(std::vector<uint8_t> data);
52 Parser(
const std::string& oat_file);
53 Parser(std::vector<uint8_t> data);
58 return *
reinterpret_cast<Binary*
>(binary_.get());
61 bool has_vdex()
const;
62 void set_vdex(std::unique_ptr<VDEX::File> file);
64 template<
typename OAT_T>
67 template<
typename OAT_T>
70 template<
typename OAT_T>
71 void parse_header_keys();
73 template<
typename OAT_T>
74 void parse_dex_files();
76 template<
typename OAT_T>
77 void parse_type_lookup_table();
79 template<
typename OAT_T>
80 void parse_oat_classes();
82 template<
typename OAT_T>
83 void parse_oat_methods(uint64_t methods_offsets,
Class& clazz,
const DEX::Class& dex_class);
87 std::unique_ptr<LIEF::VDEX::File> vdex_file_;
89 uint64_t data_address_ = 0;
90 uint64_t data_size_ = 0;
92 uint64_t exec_start_ = 0;
93 uint64_t exec_size_ = 0;
Class which represents a DEX Class (i.e. a Java/Kotlin class)
Definition DEX/Class.hpp:35
Class which parses and transforms an ELF file into a ELF::Binary object.
Definition ELF/Parser.hpp:45
Definition OAT/Binary.hpp:41
Definition OAT/Class.hpp:35
Class to parse an OAT file to produce an OAT::Binary.
Definition OAT/Parser.hpp:38
static std::unique_ptr< Binary > parse(const std::string &oat_file, const std::string &vdex_file)
static std::unique_ptr< Binary > parse(const std::string &oat_file)
Parse an OAT file.
static std::unique_ptr< Binary > parse(std::vector< uint8_t > data)
Parser & operator=(const Parser ©)=delete
Parser(const Parser ©)=delete
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41