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_ATOM_INFO_COMMAND_H
17#define LIEF_MACHO_ATOM_INFO_COMMAND_H
32struct linkedit_data_command;
37 friend class BinaryParser;
38 friend class LinkEdit;
42 AtomInfo(
const details::linkedit_data_command& cmd);
44 AtomInfo&
operator=(
const AtomInfo& copy) =
default;
47 std::unique_ptr<LoadCommand>
clone()
const override {
48 return std::unique_ptr<AtomInfo>(
new AtomInfo(*
this));
62 data_offset_ = offset;
78 void accept(Visitor& visitor)
const override;
80 std::ostream&
print(std::ostream& os)
const override;
82 static bool classof(
const LoadCommand* cmd) {
83 return cmd->
command() == LoadCommand::TYPE::ATOM_INFO;
87 uint32_t data_offset_ = 0;
88 uint32_t data_size_ = 0;
89 span<uint8_t> content_;
90 std::vector<uint8_t> tmp_buffer_;
Class which represents the LC_ATOM_INFO command.
Definition AtomInfo.hpp:36
uint32_t data_size() const
Size of the payload.
Definition AtomInfo.hpp:57
span< const uint8_t > content() const
Definition AtomInfo.hpp:68
void data_offset(uint32_t offset)
Definition AtomInfo.hpp:61
span< uint8_t > content()
Definition AtomInfo.hpp:72
~AtomInfo() override=default
std::ostream & print(std::ostream &os) const override
AtomInfo & operator=(const AtomInfo ©)=default
void accept(Visitor &visitor) const override
void data_size(uint32_t size)
Definition AtomInfo.hpp:64
uint32_t data_offset() const
Offset in the __LINKEDIT SegmentCommand where the payload start.
Definition AtomInfo.hpp:52
AtomInfo(const details::linkedit_data_command &cmd)
static bool classof(const LoadCommand *cmd)
Definition AtomInfo.hpp:82
AtomInfo(const AtomInfo ©)=default
std::unique_ptr< LoadCommand > clone() const override
Definition AtomInfo.hpp:47
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:75
Definition LinkEdit.hpp:43
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