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;
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:78
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:63
Definition LinkEdit.hpp:45
uint32_t data_size() const
Size of the payload.
Definition LinkerOptHint.hpp:59
static bool classof(const LoadCommand *cmd)
Definition LinkerOptHint.hpp:85
friend class BinaryParser
Definition LinkerOptHint.hpp:38
~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
friend class Builder
Definition LinkerOptHint.hpp:39
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
friend class LinkEdit
Definition LinkerOptHint.hpp:40
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
uint32_t size() const
Size of the command (should be greather than sizeof(load_command)).
Definition LoadCommand.hpp:133
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:128
@ LINKER_OPTIMIZATION_HINT
Definition LoadCommand.hpp:92
Definition Visitor.hpp:210
Definition endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:40
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:41