16#ifndef LIEF_MACHO_LINK_EDIT_H
17#define LIEF_MACHO_LINK_EDIT_H
45 friend class BinaryParser;
50 using SegmentCommand::SegmentCommand;
55 void swap(LinkEdit& other)
noexcept;
57 std::unique_ptr<LoadCommand>
clone()
const override {
58 return std::unique_ptr<LinkEdit>(
new LinkEdit(*
this));
63 static bool classof(
const LoadCommand* cmd) {
64 return SegmentCommand::classof(cmd);
67 static bool segmentof(
const SegmentCommand& segment) {
68 return segment.
name() ==
"__LINKEDIT";
72 LIEF_LOCAL void update_data(
const update_fnc_t& f)
override;
73 LIEF_LOCAL void update_data(
const update_fnc_ws_t& f,
74 size_t where,
size_t size)
override;
77 DyldInfo* dyld_ =
nullptr;
78 DyldChainedFixups* chained_fixups_ =
nullptr;
79 DyldExportsTrie* exports_trie_ =
nullptr;
80 SegmentSplitInfo* seg_split_ =
nullptr;
81 FunctionStarts* fstarts_ =
nullptr;
82 DataInCode* data_code_ =
nullptr;
83 CodeSignatureDir* code_sig_dir_ =
nullptr;
84 LinkerOptHint* linker_opt_ =
nullptr;
85 SymbolCommand* symtab_ =
nullptr;
86 TwoLevelHints* two_lvl_hint_ =
nullptr;
87 CodeSignature* code_sig_ =
nullptr;
88 AtomInfo* atom_info_ =
nullptr;
Class which represents the LC_ATOM_INFO command.
Definition AtomInfo.hpp:36
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 used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:58
Definition CodeSignatureDir.hpp:36
Definition CodeSignature.hpp:37
Interface of the LC_DATA_IN_CODE command This command is used to list slices of code sections that co...
Definition DataInCode.hpp:42
Class that represents the LC_DYLD_CHAINED_FIXUPS command.
Definition DyldChainedFixups.hpp:49
Class that represents the LC_DYLD_EXPORTS_TRIE command.
Definition DyldExportsTrie.hpp:40
Class that represents the LC_DYLD_INFO and LC_DYLD_INFO_ONLY commands.
Definition DyldInfo.hpp:50
Class which represents the LC_FUNCTION_STARTS command.
Definition FunctionStarts.hpp:39
Definition LinkEdit.hpp:43
void swap(LinkEdit &other) noexcept
std::unique_ptr< LoadCommand > clone() const override
Definition LinkEdit.hpp:57
static bool classof(const LoadCommand *cmd)
Definition LinkEdit.hpp:63
~LinkEdit() override=default
static bool segmentof(const SegmentCommand &segment)
Definition LinkEdit.hpp:67
LinkEdit(const LinkEdit ©)=default
LinkEdit & operator=(LinkEdit other)
Class which represents the LC_LINKER_OPTIMIZATION_HINT command.
Definition LinkerOptHint.hpp:37
Class which represents a LoadCommand::TYPE::SEGMENT / LoadCommand::TYPE::SEGMENT_64 command.
Definition SegmentCommand.hpp:50
const std::string & name() const
Name of the segment (e.g. __TEXT)
Definition SegmentCommand.hpp:116
Class that represents the LoadCommand::TYPE::SEGMENT_SPLIT_INFO command.
Definition SegmentSplitInfo.hpp:35
Class that represents the LC_SYMTAB command.
Definition SymbolCommand.hpp:35
Class which represents the LC_TWOLEVEL_HINTS command.
Definition TwoLevelHints.hpp:39
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
#define LIEF_LOCAL
Definition visibility.h:42