LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_ELF_NOTE_GNU_PROPERTY_H
17#define LIEF_ELF_NOTE_GNU_PROPERTY_H
56 virtual void dump(std::ostream& os)
const;
61 std::ostream&
operator<<(std::ostream& os,
const Property& prop) {
70 TYPE type_ = TYPE::UNKNOWN;
73 using properties_t = std::vector<std::unique_ptr<NoteGnuProperty::Property>>;
76 uint32_t type, description_t description,
77 std::string secname) :
78 Note(std::move(name), TYPE::GNU_PROPERTY_TYPE_0, type, std::move(description),
80 arch_(arch), class_(cls)
83 std::unique_ptr<Note>
clone()
const override {
84 return std::unique_ptr<Note>(
new NoteGnuProperty(*
this));
86 std::unique_ptr<NoteGnuProperty::Property>
find(Property::TYPE type)
const;
93 void dump(std::ostream& os)
const override;
95 void accept(Visitor& visitor)
const override;
98 return note->
type() == Note::TYPE::GNU_PROPERTY_TYPE_0;
104 std::ostream&
operator<<(std::ostream& os,
const NoteGnuProperty& note) {
110 ARCH arch_ = ARCH::NONE;
111 Header::CLASS class_ = Header::CLASS::NONE;
friend std::ostream & operator<<(std::ostream &os, const Property &prop)
Definition NoteGnuProperty.hpp:61
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:52
virtual ~Property()=default
virtual void dump(std::ostream &os) const
Class that wraps the NT_GNU_PROPERTY_TYPE_0 note.
Definition NoteGnuProperty.hpp:30
static bool classof(const Note *note)
Definition NoteGnuProperty.hpp:97
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition NoteGnuProperty.hpp:83
~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
NoteGnuProperty(ARCH arch, Header::CLASS cls, std::string name, uint32_t type, description_t description, std::string secname)
Definition NoteGnuProperty.hpp:75
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:104
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:195
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
const char * to_string(DynamicEntry::TAG e)
ARCH
Definition ELF/enums.hpp:30
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41