16#ifndef LIEF_MACHO_FILESET_COMMAND_H
17#define LIEF_MACHO_FILESET_COMMAND_H
20#include "LIEF/visibility.h"
22#include "LIEF/types.hpp"
23#include "LIEF/MachO/LoadCommand.hpp"
32struct fileset_entry_command;
39 using content_t = std::vector<uint8_t>;
44 name_(std::move(name))
52 std::unique_ptr<LoadCommand> clone()
const override {
59 const std::string&
name()
const {
65 return virtual_address_;
83 void name(std::string name) {
84 name_ = std::move(name);
87 void virtual_address(uint64_t virtual_address) {
88 virtual_address_ = virtual_address;
90 void file_offset(uint64_t file_offset) {
91 file_offset_ = file_offset;
94 std::ostream& print(std::ostream& os)
const override;
96 static bool classof(
const LoadCommand* cmd) {
97 return cmd->command() == LoadCommand::TYPE::FILESET_ENTRY;
102 uint64_t virtual_address_ = 0;
103 uint64_t file_offset_ = 0;
104 Binary* binary_ =
nullptr;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:73
Class which represents a MachO binary.
Definition MachO/Binary.hpp:73
Class associated with the LC_FILESET_ENTRY commands.
Definition FilesetCommand.hpp:36
uint64_t file_offset() const
Original offset in the kernel cache.
Definition FilesetCommand.hpp:69
uint64_t virtual_address() const
Memory address where the MachO file should be mapped.
Definition FilesetCommand.hpp:64
const Binary * binary() const
Return a pointer on the LIEF::MachO::Binary associated with this entry.
Definition FilesetCommand.hpp:75
const std::string & name() const
Name of the underlying MachO binary (e.g. com.apple.security.quarantine)
Definition FilesetCommand.hpp:59
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:32