16#ifndef LIEF_MACHO_NOTE_COMMAND_H
17#define LIEF_MACHO_NOTE_COMMAND_H
47 std::unique_ptr<LoadCommand>
clone()
const override {
48 return std::make_unique<NoteCommand>(*
this);
72 const auto end = std::find(owner_.begin(), owner_.end(),
'\0');
73 return {owner_.begin(), end};
77 note_offset_ = offset;
86 std::ostream&
print(std::ostream& os)
const override;
95 std::array<char, 16> owner_;
96 uint64_t note_offset_ = 0;
97 uint64_t note_size_ = 0;
uint32_t size() const
Size of the command (should be greater than sizeof(load_command)).
Definition LoadCommand.hpp:137
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:132
@ NOTE
Definition LoadCommand.hpp:98
std::ostream & print(std::ostream &os) const override
span< char > owner()
Definition NoteCommand.hpp:66
uint64_t note_offset() const
Offset of the data associated with this note.
Definition NoteCommand.hpp:52
void accept(Visitor &visitor) const override
span< const char > owner() const
Owner of the note (e.g. AIR_METALLIB).
Definition NoteCommand.hpp:62
std::unique_ptr< LoadCommand > clone() const override
Definition NoteCommand.hpp:47
std::string owner_str() const
Owner as a zero-terminated string.
Definition NoteCommand.hpp:71
NoteCommand(const details::note_command &cmd)
void note_size(uint64_t size)
Definition NoteCommand.hpp:80
static bool classof(const LoadCommand *cmd)
Definition NoteCommand.hpp:90
uint64_t note_size() const
Size of the data referenced by the note_offset.
Definition NoteCommand.hpp:57
NoteCommand & operator=(const NoteCommand ©)=default
~NoteCommand() override=default
NoteCommand(const NoteCommand ©)=default
void note_offset(uint64_t offset)
Definition NoteCommand.hpp:76
Definition Visitor.hpp:212
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Definition endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:45