16#ifndef LIEF_MACHO_LINKER_OPT_HINT_COMMAND_H
17#define LIEF_MACHO_LINKER_OPT_HINT_COMMAND_H
33struct linkedit_data_command;
49 std::unique_ptr<LoadCommand>
clone()
const override {
50 return std::unique_ptr<LinkerOptHint>(
new LinkerOptHint(*
this));
64 data_offset_ = offset;
83 std::ostream&
print(std::ostream& os)
const override;
86 return cmd->
command() == LoadCommand::TYPE::LINKER_OPTIMIZATION_HINT;
90 uint32_t data_offset_ = 0;
91 uint32_t data_size_ = 0;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:74
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:55
Definition LinkEdit.hpp:42
Class which represents the LC_LINKER_OPTIMIZATION_HINT command.
Definition LinkerOptHint.hpp:37
uint32_t data_size() const
Size of the payload.
Definition LinkerOptHint.hpp:59
static bool classof(const LoadCommand *cmd)
Definition LinkerOptHint.hpp:85
~LinkerOptHint() override=default
LinkerOptHint & operator=(const LinkerOptHint ©)=default
span< const uint8_t > content() const
Definition LinkerOptHint.hpp:71
std::ostream & print(std::ostream &os) const override
std::unique_ptr< LoadCommand > clone() const override
Definition LinkerOptHint.hpp:49
void accept(Visitor &visitor) const override
span< uint8_t > content()
Definition LinkerOptHint.hpp:75
LinkerOptHint(const LinkerOptHint ©)=default
void data_size(uint32_t size)
Definition LinkerOptHint.hpp:67
uint32_t data_offset() const
Offset in the binary where the hint starts.
Definition LinkerOptHint.hpp:54
LinkerOptHint(const details::linkedit_data_command &cmd)
void data_offset(uint32_t offset)
Definition LinkerOptHint.hpp:63
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:36
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:122
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:41