16#ifndef LIEF_MACHO_BUIDLER_H
17#define LIEF_MACHO_BUIDLER_H
22#include <unordered_map>
25#include "LIEF/errors.hpp"
26#include "LIEF/visibility.h"
28#include "LIEF/iostream.hpp"
36class CodeSignatureDir;
38class DyldChainedFixups;
44class DynamicSymbolCommand;
49class SegmentSplitInfo;
89 const std::vector<uint8_t>& get_build();
90 ok_error_t write(
const std::string& filename)
const;
96 static std::vector<uint8_t> build_raw(
Binary& binary,
config_t config);
170 template <
typename T>
176 template <
typename T>
181 template <
typename T>
186 std::vector<Binary*> binaries_;
187 Binary* binary_ =
nullptr;
189 uint64_t linkedit_offset_ = 0;
Class which represents a MachO binary.
Definition MachO/Binary.hpp:74
Definition BuildVersion.hpp:35
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:58
Definition CodeSignatureDir.hpp:38
Definition CodeSignature.hpp:38
Interface of the LC_DATA_IN_CODE command This command is used to list slices of code sections that co...
Definition DataInCode.hpp:44
Class that represents the LC_DYLD_CHAINED_FIXUPS command.
Definition DyldChainedFixups.hpp:45
Class that represents a LC_DYLD_ENVIRONMENT which is used by the Mach-O linker/loader to initialize a...
Definition DyldEnvironment.hpp:35
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 a library dependency.
Definition DylibCommand.hpp:35
Class that represents the Mach-O linker, also named loader Most of the time, DylinkerCommand::name() ...
Definition DylinkerCommand.hpp:36
Class that represents the LC_DYSYMTAB command.
Definition DynamicSymbolCommand.hpp:41
Class which represent a Mach-O (fat) binary This object is also used for representing Mach-O binaries...
Definition FatBinary.hpp:38
Class which represents the LC_FUNCTION_STARTS command.
Definition FunctionStarts.hpp:42
Class which represents the LC_LINKER_OPTIMIZATION_HINT command.
Definition LinkerOptHint.hpp:39
Class that represent the LC_MAIN command. This kind of command can be used to determine the entrypoin...
Definition MainCommand.hpp:34
Class that represents the LOAD_COMMAND_TYPES::LC_SEGMENT_SPLIT_INFO command.
Definition SegmentSplitInfo.hpp:37
Class that represents the MachO LOAD_COMMAND_TYPES::LC_SOURCE_VERSION This command is used to provide...
Definition SourceVersion.hpp:35
Class that represents the SubFramework command. Accodring to the Mach-O loader.h documentation:
Definition SubFramework.hpp:47
Class that represents the LC_SYMTAB command.
Definition SymbolCommand.hpp:36
Class that represents the LC_THREAD / LC_UNIXTHREAD commands and that can be used to get the binary e...
Definition ThreadCommand.hpp:41
Class which represents the LC_TWOLEVEL_HINTS command.
Definition TwoLevelHints.hpp:40
Class that wraps the LC_VERSION_MIN_MACOSX, LC_VERSION_MIN_IPHONEOS, ... commands.
Definition VersionMin.hpp:34
Definition iostream.hpp:30
LIEF namespace.
Definition Abstract/Binary.hpp:32
result< ok_t > ok_error_t
Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead,...
Definition errors.hpp:106
Options to tweak the building process.
Definition MachO/Builder.hpp:61