16#ifndef LIEF_ELF_CORE_AUXV_H
17#define LIEF_ELF_CORE_AUXV_H
24#include "LIEF/visibility.h"
25#include "LIEF/ELF/enums.hpp"
26#include "LIEF/ELF/Note.hpp"
72 uint32_t type, description_t description) :
73 Note(std::move(name),
Note::TYPE::CORE_AUXV, type, std::move(description)),
74 arch_(arch), class_(cls)
77 std::unique_ptr<Note>
clone()
const override {
78 return std::unique_ptr<Note>(
new CoreAuxv(*
this));
82 std::map<TYPE, uint64_t>
values()
const;
92 bool set(TYPE type, uint64_t value);
93 bool set(std::map<TYPE, uint64_t> values);
95 void dump(std::ostream& os)
const override;
97 void accept(
Visitor& visitor)
const override;
99 static bool classof(
const Note* note) {
100 return note->
type() == Note::TYPE::CORE_AUXV;
103 ~CoreAuxv()
override =
default;
106 std::ostream& operator<<(std::ostream& os,
const CoreAuxv& note) {
112 ARCH arch_ = ARCH::NONE;
113 Header::CLASS class_ = Header::CLASS::NONE;
Class representing core auxv object.
Definition CoreAuxv.hpp:32
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition CoreAuxv.hpp:77
std::map< TYPE, uint64_t > values() const
A map of CoreAuxv::TYPE and the value.
TYPE
Definition CoreAuxv.hpp:34
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: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
ARCH
Machine architectures See current registered ELF machine architectures at: http://www....
Definition ELF/enums.hpp:30
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