16#ifndef LIEF_ELF_NOTE_ABI_H
17#define LIEF_ELF_NOTE_ABI_H
24#include "LIEF/visibility.h"
25#include "LIEF/ELF/Note.hpp"
46 static constexpr size_t abi_offset = 0;
47 static constexpr size_t abi_size =
sizeof(uint32_t);
49 static constexpr size_t version_offset = abi_size;
50 static constexpr size_t version_size = 3 *
sizeof(uint32_t);
55 std::unique_ptr<Note>
clone()
const override {
56 return std::unique_ptr<Note>(
new NoteAbi(*
this));
66 void version(
ABI abi);
68 void dump(std::ostream& os)
const override;
70 void accept(
Visitor& visitor)
const override;
72 static bool classof(
const Note* note) {
73 return note->
type() == Note::TYPE::GNU_ABI_TAG;
77 static constexpr uint8_t description_size() {
78 return sizeof(uint32_t) + 3 *
sizeof(uint32_t);
81 ~NoteAbi()
override =
default;
84 std::ostream& operator<<(std::ostream& os,
const NoteAbi& note) {
Class that wraps the NT_GNU_ABI_TAG note.
Definition NoteAbi.hpp:31
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition NoteAbi.hpp:55
result< ABI > abi() const
Return the ABI or an error if it can't be parsed.
std::array< uint32_t, 3 > version_t
Version type: (Major, Minor, Patch)
Definition NoteAbi.hpp:44
result< version_t > version() const
Return the version or an error if it can't be parsed.
ABI
ABI recognized by this note.
Definition NoteAbi.hpp:34
Class which represents an ELF note. This class can be instantiated using the static Note::create func...
Definition Note.hpp:36
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:178
Definition Visitor.hpp:219
LIEF namespace.
Definition Abstract/Binary.hpp:32
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:72