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_FILESET_COMMAND_H
17#define LIEF_MACHO_FILESET_COMMAND_H
31struct fileset_entry_command;
37 friend class BinaryParser;
38 using content_t = std::vector<uint8_t>;
43 name_(std::move(name))
49 void swap(FilesetCommand& other)
noexcept;
51 std::unique_ptr<LoadCommand>
clone()
const override {
52 return std::unique_ptr<FilesetCommand>(
new FilesetCommand(*
this));
56 const std::string&
name()
const {
64 return virtual_address_;
71 const Binary*
binary()
const {
82 void name(std::string name) {
83 name_ = std::move(name);
87 virtual_address_ = virtual_address;
90 file_offset_ = file_offset;
93 std::ostream&
print(std::ostream& os)
const override;
95 static bool classof(
const LoadCommand* cmd) {
96 return cmd->
command() == LoadCommand::TYPE::FILESET_ENTRY;
101 uint64_t virtual_address_ = 0;
102 uint64_t file_offset_ = 0;
103 Binary* binary_ =
nullptr;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:75
Class which represents a MachO binary.
Definition MachO/Binary.hpp:86
Class associated with the LC_FILESET_ENTRY commands.
Definition FilesetCommand.hpp:35
void virtual_address(uint64_t virtual_address)
Definition FilesetCommand.hpp:86
uint64_t file_offset() const
Original offset in the kernel cache.
Definition FilesetCommand.hpp:68
std::unique_ptr< LoadCommand > clone() const override
Definition FilesetCommand.hpp:51
void name(std::string name)
Definition FilesetCommand.hpp:82
uint64_t virtual_address() const
Memory address where the MachO file should be mapped.
Definition FilesetCommand.hpp:63
static bool classof(const LoadCommand *cmd)
Definition FilesetCommand.hpp:95
void swap(FilesetCommand &other) noexcept
FilesetCommand & operator=(FilesetCommand copy)
FilesetCommand(std::string name)
Definition FilesetCommand.hpp:42
std::ostream & print(std::ostream &os) const override
const Binary * binary() const
Return a pointer on the LIEF::MachO::Binary associated with this entry.
Definition FilesetCommand.hpp:74
FilesetCommand(const details::fileset_entry_command &command)
const std::string & name() const
Name of the underlying MachO binary (e.g. com.apple.security.quarantine)
Definition FilesetCommand.hpp:58
void file_offset(uint64_t file_offset)
Definition FilesetCommand.hpp:89
FilesetCommand(const FilesetCommand ©)
~FilesetCommand() override=default
Binary * binary()
Definition FilesetCommand.hpp:78
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