16#ifndef LIEF_ELF_ANDROID_IDENT_H
17#define LIEF_ELF_ANDROID_IDENT_H
22#include "LIEF/visibility.h"
23#include "LIEF/ELF/Note.hpp"
33 static constexpr size_t sdk_version_size =
sizeof(uint32_t);
34 static constexpr size_t ndk_version_size = 64 *
sizeof(char);
35 static constexpr size_t ndk_build_number_size = 64 *
sizeof(char);
38 std::unique_ptr<Note>
clone()
const override {
39 return std::unique_ptr<AndroidIdent>(
new AndroidIdent(*
this));
51 void sdk_version(uint32_t version);
52 void ndk_version(
const std::string& ndk_version);
53 void ndk_build_number(
const std::string& ndk_build_number);
55 void dump(std::ostream& os)
const override;
57 void accept(
Visitor& visitor)
const override;
59 static bool classof(
const Note* note) {
60 return note->
type() == Note::TYPE::ANDROID_IDENT;
65 static constexpr size_t description_size() {
66 return sdk_version_size + ndk_version_size + ndk_build_number_size;
70 std::ostream& operator<<(std::ostream& os,
const AndroidIdent& note) {
Class representing the ".note.android.ident" section.
Definition AndroidIdent.hpp:31
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition AndroidIdent.hpp:38
std::string ndk_build_number() const
NDK build number (or an empty string if it can't be parsed)
std::string ndk_version() const
NDK version used (or an empty string if it can't be parsed)
uint32_t sdk_version() const
Target SDK version (or 0 if it can't be resolved)
Class which represents an ELF note. This class can be instantiated using the static Note::create func...
Definition Note.hpp:39
TYPE type() const
Return the type of the note. This type does not match the NT_ type value. For accessing the original ...
Definition Note.hpp:183
Definition Visitor.hpp:221
LIEF namespace.
Definition Abstract/Binary.hpp:31