16#ifndef LIEF_MACHO_LINKER_OPT_HINT_COMMAND_H
17#define LIEF_MACHO_LINKER_OPT_HINT_COMMAND_H
35struct linkedit_data_command;
51 std::unique_ptr<LoadCommand>
clone()
const override {
52 return std::make_unique<LinkerOptHint>(*
this);
66 data_offset_ = offset;
85 std::ostream&
print(std::ostream& os)
const override;
92 uint32_t data_offset_ = 0;
93 uint32_t data_size_ = 0;
Class used to parse a single binary (i.e. non-FAT).
Definition BinaryParser.hpp:79
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:64
Definition LinkEdit.hpp:47
uint32_t data_size() const
Size of the payload.
Definition LinkerOptHint.hpp:61
static bool classof(const LoadCommand *cmd)
Definition LinkerOptHint.hpp:87
friend class BinaryParser
Definition LinkerOptHint.hpp:40
~LinkerOptHint() override=default
LinkerOptHint & operator=(const LinkerOptHint ©)=default
span< const uint8_t > content() const
Definition LinkerOptHint.hpp:73
std::ostream & print(std::ostream &os) const override
friend class Builder
Definition LinkerOptHint.hpp:41
std::unique_ptr< LoadCommand > clone() const override
Definition LinkerOptHint.hpp:51
void accept(Visitor &visitor) const override
span< uint8_t > content()
Definition LinkerOptHint.hpp:77
friend class LinkEdit
Definition LinkerOptHint.hpp:42
LinkerOptHint(const LinkerOptHint ©)=default
void data_size(uint32_t size)
Definition LinkerOptHint.hpp:69
uint32_t data_offset() const
Offset in the binary where the hint starts.
Definition LinkerOptHint.hpp:56
LinkerOptHint(const details::linkedit_data_command &cmd)
void data_offset(uint32_t offset)
Definition LinkerOptHint.hpp:65
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
@ LINKER_OPTIMIZATION_HINT
Definition LoadCommand.hpp:95
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