16#ifndef LIEF_ELF_ANDROID_IDENT_H
17#define LIEF_ELF_ANDROID_IDENT_H
23#include "LIEF/visibility.h"
24#include "LIEF/ELF/Note.hpp"
34 static constexpr size_t sdk_version_size =
sizeof(uint32_t);
35 static constexpr size_t ndk_version_size = 64 *
sizeof(char);
36 static constexpr size_t ndk_build_number_size = 64 *
sizeof(char);
39 std::unique_ptr<Note>
clone()
const override {
40 return std::unique_ptr<AndroidIdent>(
new AndroidIdent(*
this));
52 void sdk_version(uint32_t version);
53 void ndk_version(
const std::string& ndk_version);
54 void ndk_build_number(
const std::string& ndk_build_number);
56 void dump(std::ostream& os)
const override;
58 void accept(
Visitor& visitor)
const override;
60 static bool classof(
const Note* note) {
61 return note->
type() == Note::TYPE::ANDROID_IDENT;
66 static constexpr size_t description_size() {
67 return sdk_version_size + ndk_version_size + ndk_build_number_size;
71 std::ostream& operator<<(std::ostream& os,
const AndroidIdent& note) {
Class representing the ".note.android.ident" section.
Definition AndroidIdent.hpp:32
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition AndroidIdent.hpp:39
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:181
Definition Visitor.hpp:219
LIEF namespace.
Definition Abstract/Binary.hpp:32