diff options
Diffstat (limited to 'include/llvm/MC/MCMachObjectWriter.h')
-rw-r--r-- | include/llvm/MC/MCMachObjectWriter.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/include/llvm/MC/MCMachObjectWriter.h b/include/llvm/MC/MCMachObjectWriter.h index 175d73e72c10..cd3db957afc1 100644 --- a/include/llvm/MC/MCMachObjectWriter.h +++ b/include/llvm/MC/MCMachObjectWriter.h @@ -13,6 +13,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallString.h" #include "llvm/MC/MCExpr.h" +#include "llvm/MC/MCSection.h" #include "llvm/MC/MCObjectWriter.h" #include "llvm/MC/StringTableBuilder.h" #include "llvm/Support/DataTypes.h" @@ -104,7 +105,7 @@ class MachObjectWriter : public MCObjectWriter { /// \name Symbol Table Data /// @{ - StringTableBuilder StringTable; + StringTableBuilder StringTable{StringTableBuilder::MachO}; std::vector<MachSymbolData> LocalSymbolData; std::vector<MachSymbolData> ExternalSymbolData; std::vector<MachSymbolData> UndefinedSymbolData; @@ -159,19 +160,21 @@ public: /// @} - void writeHeader(unsigned NumLoadCommands, unsigned LoadCommandsSize, - bool SubsectionsViaSymbols); + void writeHeader(MachO::HeaderFileType Type, unsigned NumLoadCommands, + unsigned LoadCommandsSize, bool SubsectionsViaSymbols); /// Write a segment load command. /// /// \param NumSections The number of sections in this segment. /// \param SectionDataSize The total size of the sections. - void writeSegmentLoadCommand(unsigned NumSections, uint64_t VMSize, + void writeSegmentLoadCommand(StringRef Name, unsigned NumSections, + uint64_t VMAddr, uint64_t VMSize, uint64_t SectionDataStartOffset, - uint64_t SectionDataSize); + uint64_t SectionDataSize, uint32_t MaxProt, + uint32_t InitProt); - void writeSection(const MCAssembler &Asm, const MCAsmLayout &Layout, - const MCSection &Sec, uint64_t FileOffset, + void writeSection(const MCAsmLayout &Layout, const MCSection &Sec, + uint64_t VMAddr, uint64_t FileOffset, unsigned Flags, uint64_t RelocationsStart, unsigned NumRelocations); void writeSymtabLoadCommand(uint32_t SymbolOffset, uint32_t NumSymbols, @@ -246,6 +249,11 @@ public: const MCAsmLayout &Layout) override; bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, + const MCSymbol &A, + const MCSymbol &B, + bool InSet) const override; + + bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, const MCSymbol &SymA, const MCFragment &FB, bool InSet, bool IsPCRel) const override; |