LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
LIEF::OAT Namespace Reference

Classes

class  Binary
 
class  Class
 
class  DexFile
 
class  Hash
 
class  Header
 
class  Method
 
class  Parser
 Class to parse an OAT file to produce an OAT::Binary. More...
 

Typedefs

using oat_version_t = uint32_t
 

Enumerations

enum  OAT_CLASS_TYPES { OAT_CLASS_ALL_COMPILED = 0 , OAT_CLASS_SOME_COMPILED = 1 , OAT_CLASS_NONE_COMPILED = 2 }
 
enum  OAT_CLASS_STATUS {
  STATUS_RETIRED = -2 , STATUS_ERROR = -1 , STATUS_NOTREADY = 0 , STATUS_IDX = 1 ,
  STATUS_LOADED = 2 , STATUS_RESOLVING = 3 , STATUS_RESOLVED = 4 , STATUS_VERIFYING = 5 ,
  STATUS_RETRY_VERIFICATION_AT_RUNTIME = 6 , STATUS_VERIFYING_AT_RUNTIME = 7 , STATUS_VERIFIED = 8 , STATUS_INITIALIZING = 9 ,
  STATUS_INITIALIZED = 10
}
 
enum  HEADER_KEYS {
  KEY_IMAGE_LOCATION = 0 , KEY_DEX2OAT_CMD_LINE = 1 , KEY_DEX2OAT_HOST = 2 , KEY_PIC = 3 ,
  KEY_HAS_PATCH_INFO = 4 , KEY_DEBUGGABLE = 5 , KEY_NATIVE_DEBUGGABLE = 6 , KEY_COMPILER_FILTER = 7 ,
  KEY_CLASS_PATH = 8 , KEY_BOOT_CLASS_PATH = 9 , KEY_CONCURRENT_COPYING = 10 , KE_COMPILATION_REASON = 11
}
 
enum  INSTRUCTION_SETS {
  INST_SET_NONE = 0 , INST_SET_ARM = 1 , INST_SET_ARM_64 = 2 , INST_SET_THUMB2 = 3 ,
  INST_SET_X86 = 4 , INST_SET_X86_64 = 5 , INST_SET_MIPS = 6 , INST_SET_MIPS_64 = 7
}
 

Functions

const char * to_string (OAT_CLASS_TYPES e)
 
const char * to_string (OAT_CLASS_STATUS e)
 
const char * to_string (HEADER_KEYS e)
 
const char * to_string (INSTRUCTION_SETS e)
 
std::string to_json (const Object &v)
 
bool is_oat (const LIEF::ELF::Binary &elf_binary)
 Check if the given LIEF::ELF::Binary is an OAT one.
 
bool is_oat (const std::string &file)
 Check if the given file is an OAT one.
 
bool is_oat (const std::vector< uint8_t > &raw)
 Check if the given raw data is an OAT one.
 
oat_version_t version (const std::string &file)
 Return the OAT version of the given file.
 
oat_version_t version (const std::vector< uint8_t > &raw)
 Return the OAT version of the raw data.
 
oat_version_t version (const LIEF::ELF::Binary &elf_binary)
 Return the OAT version of the given LIEF::ELF::Binary.
 
LIEF::Android::ANDROID_VERSIONS android_version (oat_version_t version)
 Return the ANDROID_VERSIONS associated with the given OAT version.
 

Typedef Documentation

◆ oat_version_t

using LIEF::OAT::oat_version_t = uint32_t

Enumeration Type Documentation

◆ HEADER_KEYS

Enumerator
KEY_IMAGE_LOCATION 
KEY_DEX2OAT_CMD_LINE 
KEY_DEX2OAT_HOST 
KEY_PIC 
KEY_HAS_PATCH_INFO 
KEY_DEBUGGABLE 
KEY_NATIVE_DEBUGGABLE 
KEY_COMPILER_FILTER 
KEY_CLASS_PATH 
KEY_BOOT_CLASS_PATH 
KEY_CONCURRENT_COPYING 
KE_COMPILATION_REASON 

◆ INSTRUCTION_SETS

Enumerator
INST_SET_NONE 
INST_SET_ARM 
INST_SET_ARM_64 
INST_SET_THUMB2 
INST_SET_X86 
INST_SET_X86_64 
INST_SET_MIPS 
INST_SET_MIPS_64 

◆ OAT_CLASS_STATUS

Enumerator
STATUS_RETIRED 
STATUS_ERROR 
STATUS_NOTREADY 
STATUS_IDX 
STATUS_LOADED 
STATUS_RESOLVING 
STATUS_RESOLVED 
STATUS_VERIFYING 
STATUS_RETRY_VERIFICATION_AT_RUNTIME 
STATUS_VERIFYING_AT_RUNTIME 
STATUS_VERIFIED 
STATUS_INITIALIZING 
STATUS_INITIALIZED 

◆ OAT_CLASS_TYPES

Enumerator
OAT_CLASS_ALL_COMPILED 
OAT_CLASS_SOME_COMPILED 

OatClass is followed by an OatMethodOffsets for each method.

OAT_CLASS_NONE_COMPILED 

A bitmap of which OatMethodOffsets are present follows the OatClass.

Function Documentation

◆ android_version()

LIEF::Android::ANDROID_VERSIONS LIEF::OAT::android_version ( oat_version_t version)

Return the ANDROID_VERSIONS associated with the given OAT version.

◆ is_oat() [1/3]

bool LIEF::OAT::is_oat ( const LIEF::ELF::Binary & elf_binary)

Check if the given LIEF::ELF::Binary is an OAT one.

◆ is_oat() [2/3]

bool LIEF::OAT::is_oat ( const std::string & file)

Check if the given file is an OAT one.

◆ is_oat() [3/3]

bool LIEF::OAT::is_oat ( const std::vector< uint8_t > & raw)

Check if the given raw data is an OAT one.

◆ to_json()

std::string LIEF::OAT::to_json ( const Object & v)

◆ to_string() [1/4]

const char * LIEF::OAT::to_string ( HEADER_KEYS e)

◆ to_string() [2/4]

const char * LIEF::OAT::to_string ( INSTRUCTION_SETS e)

◆ to_string() [3/4]

const char * LIEF::OAT::to_string ( OAT_CLASS_STATUS e)

◆ to_string() [4/4]

const char * LIEF::OAT::to_string ( OAT_CLASS_TYPES e)

◆ version() [1/3]

oat_version_t LIEF::OAT::version ( const LIEF::ELF::Binary & elf_binary)

Return the OAT version of the given LIEF::ELF::Binary.

◆ version() [2/3]

oat_version_t LIEF::OAT::version ( const std::string & file)

Return the OAT version of the given file.

◆ version() [3/3]

oat_version_t LIEF::OAT::version ( const std::vector< uint8_t > & raw)

Return the OAT version of the raw data.