15#ifndef LIEF_ELF_NOTE_GNU_PROPERTY_H
16#define LIEF_ELF_NOTE_GNU_PROPERTY_H
70 virtual void dump(std::ostream& os)
const;
83 TYPE type_ = TYPE::UNKNOWN;
86 using properties_t = std::vector<std::unique_ptr<NoteGnuProperty::Property>>;
92 std::move(secname), endianness),
96 std::unique_ptr<Note>
clone()
const override {
106 void dump(std::ostream& os)
const override;
This class wraps the different properties that can be used in a NT_GNU_PROPERTY_TYPE_0 note.
Definition NoteGnuProperty.hpp:33
friend std::ostream & operator<<(std::ostream &os, const Property &prop)
Definition NoteGnuProperty.hpp:74
TYPE
LIEF's mirror types of the original GNU_PROPERTY_ values.
Definition NoteGnuProperty.hpp:38
TYPE type() const
Return the LIEF's mirror type of the note.
Definition NoteGnuProperty.hpp:66
virtual ~Property()=default
virtual void dump(std::ostream &os) const
std::vector< std::unique_ptr< NoteGnuProperty::Property > > properties_t
Definition NoteGnuProperty.hpp:86
static bool classof(const Note *note)
Definition NoteGnuProperty.hpp:110
NoteGnuProperty(ARCH arch, Header::CLASS cls, std::string name, uint32_t type, description_t description, std::string secname, Header::ELF_DATA endianness=Header::ELF_DATA::LSB)
Definition NoteGnuProperty.hpp:88
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition NoteGnuProperty.hpp:96
~NoteGnuProperty() override=default
std::unique_ptr< NoteGnuProperty::Property > find(Property::TYPE type) const
Find the property with the given type or return a nullptr.
void dump(std::ostream &os) const override
void accept(Visitor &visitor) const override
properties_t properties() const
Return the properties as a list of Property.
friend std::ostream & operator<<(std::ostream &os, const NoteGnuProperty ¬e)
Definition NoteGnuProperty.hpp:116
std::vector< uint8_t > description_t
Container used to handle the description data.
Definition Note.hpp:47
TYPE
LIEF representation of the ELF NT_ values.
Definition Note.hpp:50
@ GNU_PROPERTY_TYPE_0
Match NT_GNU_PROPERTY_TYPE_0: Program property note, as described in "Linux Extensions to the gABI".
Definition Note.hpp:68
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:206
std::string_view name() const
Return the name of the note (also known as 'owner' ).
Definition Note.hpp:195
Note(const Note ©)=default
span< const uint8_t > description() const
Return the description associated with the note.
Definition Note.hpp:217
Definition Visitor.hpp:211
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:27
const char * to_string(DynamicEntry::TAG e)
ARCH
Definition ELF/enums.hpp:27
@ NONE
Definition ELF/enums.hpp:28
#define LIEF_API
Definition visibility.h:44