LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Class representing the ".note.android.ident" section. More...
#include <AndroidIdent.hpp>
Public Member Functions | |
std::unique_ptr< Note > | clone () const override |
Clone the current note and keep its polymorphic type. | |
uint32_t | sdk_version () const |
Target SDK version (or 0 if it can't be resolved). | |
std::string | ndk_version () const |
NDK version used (or an empty string if it can't be parsed). | |
std::string | ndk_build_number () const |
NDK build number (or an empty string if it can't be parsed). | |
void | sdk_version (uint32_t version) |
void | ndk_version (const std::string &ndk_version) |
void | ndk_build_number (const std::string &ndk_build_number) |
void | dump (std::ostream &os) const override |
void | accept (Visitor &visitor) const override |
~AndroidIdent () override=default | |
Public Member Functions inherited from LIEF::ELF::Note | |
Note & | operator= (const Note ©)=default |
Note (const Note ©)=default | |
~Note () override=default | |
const std::string & | name () const |
Return the name of the note (also known as 'owner' ). | |
const std::string & | section_name () const |
Return the section name in which the note is or should be stored. | |
TYPE | type () const |
Return the type of the note. This type does not match the NT_ type value. For accessing the original NT_ value, check original_type(). | |
uint32_t | original_type () const |
The original NT_xxx integer value. The meaning of this value likely depends on the owner of the note. | |
span< const uint8_t > | description () const |
Return the description associated with the note. | |
span< uint8_t > | description () |
void | name (std::string name) |
void | description (description_t description) |
Change the description of the note. | |
uint64_t | size () const |
Size of the raw note which includes padding. | |
void | accept (Visitor &visitor) const override |
template<class T> | |
const T * | cast () const |
template<class T> | |
T * | cast () |
Public Member Functions inherited from LIEF::Object | |
Object () | |
Object (const Object &other) | |
Object & | operator= (const Object &other) |
Object (Object &&other) noexcept=default | |
Object & | operator= (Object &&other) noexcept=default |
template<class T> | |
output_t< T > | as () |
template<class T> | |
output_const_t< T > | as () const |
virtual bool | operator== (const Object &other) const |
virtual bool | operator!= (const Object &other) const |
virtual | ~Object () |
Static Public Member Functions | |
static bool | classof (const Note *note) |
static constexpr size_t | description_size () |
Static Public Member Functions inherited from LIEF::ELF::Note | |
static result< TYPE > | convert_type (Header::FILE_TYPE ftype, uint32_t type, const std::string &name) |
Convert the raw integer note type into a TYPE according to the owner. | |
static result< const char * > | type_to_section (TYPE type) |
Try to determine the ELF section name associated with the TYPE provided in parameter. | |
static result< std::string > | note_to_section (const Note ¬e) |
static result< const char * > | type_owner (TYPE type) |
Try to determine the owner's name of the TYPE provided in parameter. | |
static std::unique_ptr< Note > | create (const std::string &name, uint32_t type, description_t description, std::string section_name, Header::FILE_TYPE ftype=Header::FILE_TYPE::NONE, ARCH arch=ARCH::NONE, Header::CLASS cls=Header::CLASS::NONE) |
Create a new note from the given parameters. Additional information such as the architecture or the ELF class could be required for creating notes like Coredump notes. | |
static std::unique_ptr< Note > | create (const std::string &name, TYPE type, description_t description, std::string section_name, ARCH arch=ARCH::NONE, Header::CLASS cls=Header::CLASS::NONE) |
Create a new note from the given parameters. Additional information such as the architecture or the ELF class could be required for creating notes like Coredump notes. | |
static std::unique_ptr< Note > | create (BinaryStream &stream, std::string section_name, Header::FILE_TYPE ftype=Header::FILE_TYPE::NONE, ARCH arch=ARCH::NONE, Header::CLASS cls=Header::CLASS::NONE) |
Create a new note from the given stream. Additional information such as the architecture or the ELF class could be required for creating notes like Coredump notes. |
Static Public Attributes | |
static constexpr size_t | sdk_version_size = sizeof(uint32_t) |
static constexpr size_t | ndk_version_size = 64 * sizeof(char) |
static constexpr size_t | ndk_build_number_size = 64 * sizeof(char) |
Class representing the ".note.android.ident" section.
|
overridedefault |
|
overridevirtual |
Implements LIEF::Object.
|
inlinestatic |
References LIEF::ELF::Note::ANDROID_IDENT, and LIEF::ELF::Note::type().
|
inlineoverridevirtual |
Clone the current note and keep its polymorphic type.
Reimplemented from LIEF::ELF::Note.
|
inlinestaticconstexpr |
References ndk_build_number_size, ndk_version_size, and sdk_version_size.
|
overridevirtual |
Reimplemented from LIEF::ELF::Note.
Referenced by operator<<.
std::string LIEF::ELF::AndroidIdent::ndk_build_number | ( | ) | const |
NDK build number (or an empty string if it can't be parsed).
Referenced by ndk_build_number().
void LIEF::ELF::AndroidIdent::ndk_build_number | ( | const std::string & | ndk_build_number | ) |
References ndk_build_number().
std::string LIEF::ELF::AndroidIdent::ndk_version | ( | ) | const |
NDK version used (or an empty string if it can't be parsed).
Referenced by ndk_version().
void LIEF::ELF::AndroidIdent::ndk_version | ( | const std::string & | ndk_version | ) |
References ndk_version().
uint32_t LIEF::ELF::AndroidIdent::sdk_version | ( | ) | const |
Target SDK version (or 0 if it can't be resolved).
void LIEF::ELF::AndroidIdent::sdk_version | ( | uint32_t | version | ) |
References LIEF::version().
|
staticconstexpr |
Referenced by description_size().
|
staticconstexpr |
Referenced by description_size().
|
staticconstexpr |
Referenced by description_size().