Go to the documentation of this file.
16#ifndef LIEF_ELF_CORE_AUXV_H
17#define LIEF_ELF_CORE_AUXV_H
70 CoreAuxv(ARCH arch, Header::CLASS cls, std::string name,
71 uint32_t type, description_t description) :
72 Note(std::move(name), Note::TYPE::CORE_AUXV, type, std::move(description),
""),
73 arch_(arch), class_(cls)
76 std::unique_ptr<Note>
clone()
const override {
77 return std::unique_ptr<Note>(
new CoreAuxv(*
this));
79 std::map<TYPE, uint64_t>
values()
const;
82 result<uint64_t>
get(TYPE type)
const;
91 bool set(TYPE type, uint64_t value);
92 bool set(
const std::map<TYPE, uint64_t>& values);
94 void dump(std::ostream& os)
const override;
96 void accept(Visitor& visitor)
const override;
99 return note->
type() == Note::TYPE::CORE_AUXV;
105 std::ostream&
operator<<(std::ostream& os,
const CoreAuxv& note) {
111 ARCH arch_ = ARCH::NONE;
112 Header::CLASS class_ = Header::CLASS::NONE;
Class representing core auxv object.
Definition CoreAuxv.hpp:31
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition CoreAuxv.hpp:76
std::map< TYPE, uint64_t > values() const
A map of CoreAuxv::TYPE and the value.
TYPE
Definition CoreAuxv.hpp:33
void dump(std::ostream &os) const override
static bool classof(const Note *note)
Definition CoreAuxv.hpp:98
bool set(TYPE type, uint64_t value)
~CoreAuxv() override=default
bool set(const std::map< TYPE, uint64_t > &values)
CoreAuxv(ARCH arch, Header::CLASS cls, std::string name, uint32_t type, description_t description)
Definition CoreAuxv.hpp:70
result< uint64_t > operator[](TYPE type) const
Definition CoreAuxv.hpp:87
friend std::ostream & operator<<(std::ostream &os, const CoreAuxv ¬e)
Definition CoreAuxv.hpp:105
void accept(Visitor &visitor) const override
result< uint64_t > get(TYPE type) const
Return the value associated with the provided TYPE or a lief_errors::not_found if the type is not pre...
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