16#ifndef LIEF_ELF_NOTE_GNU_PROPERTY_H
17#define LIEF_ELF_NOTE_GNU_PROPERTY_H
23#include "LIEF/visibility.h"
24#include "LIEF/ELF/Note.hpp"
55 virtual void dump(std::ostream& os)
const;
60 std::ostream& operator<<(std::ostream& os,
const Property& prop) {
69 TYPE type_ = TYPE::UNKNOWN;
72 using properties_t = std::vector<std::unique_ptr<NoteGnuProperty::Property>>;
74 NoteGnuProperty(ARCH arch, Header::CLASS cls, std::string name,
75 uint32_t type, description_t description) :
76 Note(std::move(name), TYPE::GNU_PROPERTY_TYPE_0, type, std::move(description)),
77 arch_(arch), class_(cls)
80 std::unique_ptr<Note>
clone()
const override {
90 void dump(std::ostream& os)
const override;
92 void accept(
Visitor& visitor)
const override;
94 static bool classof(
const Note* note) {
95 return note->
type() == Note::TYPE::GNU_PROPERTY_TYPE_0;
101 std::ostream& operator<<(std::ostream& os,
const NoteGnuProperty& note) {
107 ARCH arch_ = ARCH::NONE;
108 Header::CLASS class_ = Header::CLASS::NONE;
This class wraps the different properties that can be used in a NT_GNU_PROPERTY_TYPE_0 note.
Definition NoteGnuProperty.hpp:35
TYPE
LIEF's mirror types of the original GNU_PROPERTY_ values.
Definition NoteGnuProperty.hpp:39
TYPE type() const
Return the LIEF's mirror type of the note.
Definition NoteGnuProperty.hpp:51
Class that wraps the NT_GNU_PROPERTY_TYPE_0 note.
Definition NoteGnuProperty.hpp:30
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition NoteGnuProperty.hpp:80
std::unique_ptr< NoteGnuProperty::Property > find(Property::TYPE type) const
Find the property with the given type or return a nullptr
properties_t properties() const
Return the properties as a list of Property.
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