16#ifndef LIEF_MACHO_NOTE_COMMAND_H
17#define LIEF_MACHO_NOTE_COMMAND_H
46 std::unique_ptr<LoadCommand>
clone()
const override {
47 return std::unique_ptr<NoteCommand>(
new NoteCommand(*
this));
71 const auto end = std::find(owner_.begin(), owner_.end(),
'\0');
72 return {owner_.begin(), end};
76 note_offset_ = offset;
85 std::ostream&
print(std::ostream& os)
const override;
94 std::array<char, 16> owner_;
95 uint64_t note_offset_ = 0;
96 uint64_t note_size_ = 0;
uint32_t size() const
Size of the command (should be greater than sizeof(load_command)).
Definition LoadCommand.hpp:135
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:130
@ NOTE
Definition LoadCommand.hpp:97
std::ostream & print(std::ostream &os) const override
span< char > owner()
Definition NoteCommand.hpp:65
uint64_t note_offset() const
Offset of the data associated with this note.
Definition NoteCommand.hpp:51
void accept(Visitor &visitor) const override
span< const char > owner() const
Owner of the note (e.g. AIR_METALLIB).
Definition NoteCommand.hpp:61
std::unique_ptr< LoadCommand > clone() const override
Definition NoteCommand.hpp:46
std::string owner_str() const
Owner as a zero-terminated string.
Definition NoteCommand.hpp:70
NoteCommand(const details::note_command &cmd)
void note_size(uint64_t size)
Definition NoteCommand.hpp:79
static bool classof(const LoadCommand *cmd)
Definition NoteCommand.hpp:89
uint64_t note_size() const
Size of the data referenced by the note_offset.
Definition NoteCommand.hpp:56
NoteCommand & operator=(const NoteCommand ©)=default
~NoteCommand() override=default
NoteCommand(const NoteCommand ©)=default
void note_offset(uint64_t offset)
Definition NoteCommand.hpp:75
Definition Visitor.hpp:212
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Definition endianness_support.hpp:60
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:41
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:45