LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_MACHO_LINKER_OPT_HINT_COMMAND_H
17#define LIEF_MACHO_LINKER_OPT_HINT_COMMAND_H
33struct linkedit_data_command;
38 friend class BinaryParser;
40 friend class LinkEdit;
46 LinkerOptHint&
operator=(
const LinkerOptHint& copy) =
default;
49 std::unique_ptr<LoadCommand>
clone()
const override {
50 return std::unique_ptr<LinkerOptHint>(
new LinkerOptHint(*
this));
64 data_offset_ = offset;
81 void accept(Visitor& visitor)
const override;
83 std::ostream&
print(std::ostream& os)
const override;
85 static bool classof(
const LoadCommand* cmd) {
86 return cmd->
command() == LoadCommand::TYPE::LINKER_OPTIMIZATION_HINT;
90 uint32_t data_offset_ = 0;
91 uint32_t data_size_ = 0;
92 span<uint8_t> content_;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:75
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:58
Definition LinkEdit.hpp:43
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:37
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:125
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:36
#define LIEF_API
Definition visibility.h:41