9#ifndef LLVM_LIB_OBJCOPY_MACHO_MACHOWRITER_H
10#define LLVM_LIB_OBJCOPY_MACHO_MACHOWRITER_H
29 std::unique_ptr<WritableMemoryBuffer> Buf;
33 size_t headerSize()
const;
34 size_t loadCommandsSize()
const;
35 size_t symTableSize()
const;
36 size_t strTableSize()
const;
39 void writeLoadCommands();
40 template <
typename StructType>
41 void writeSectionInLoadCommand(
const Section &Sec, uint8_t *&Out);
43 void writeSymbolTable();
44 void writeStringTable();
45 void writeRebaseInfo();
47 void writeWeakBindInfo();
48 void writeLazyBindInfo();
49 void writeExportInfo();
50 void writeIndirectSymbolTable();
51 void writeLinkData(std::optional<size_t> LCIndex,
const LinkData &LD);
52 void writeCodeSignatureData();
53 void writeDataInCodeData();
54 void writeLinkerOptimizationHint();
55 void writeFunctionStartsData();
56 void writeDylibCodeSignDRsData();
57 void writeChainedFixupsData();
58 void writeExportsTrieData();
64 : O(O), Is64Bit(Is64Bit), IsLittleEndian(IsLittleEndian),
65 PageSize(PageSize), Out(Out),
66 LayoutBuilder(O, Is64Bit, OutputFileName, PageSize) {}
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
MachOWriter(Object &O, bool Is64Bit, bool IsLittleEndian, StringRef OutputFileName, uint64_t PageSize, raw_ostream &Out)
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.