Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Classes |Public Types |Public Member Functions |Public Attributes |List of all members
llvm::MachObjectWriter Class Referencefinal

#include "llvm/MC/MCMachObjectWriter.h"

Inheritance diagram for llvm::MachObjectWriter:
Inheritance graph
[legend]

Classes

struct  DataRegionData
 

Public Types

using VersionInfoType = {bool EmitBuildVersion
 

Public Member Functions

 MachObjectWriter (std::unique_ptr<MCMachObjectTargetWriter > MOTW,raw_pwrite_stream &OS,bool IsLittleEndian)
 
constMCSymbolfindAliasedSymbol (constMCSymbol &Sym)const
 
void writeHeader (MachO::HeaderFileTypeType,unsigned NumLoadCommands,unsigned LoadCommandsSize,boolSubsectionsViaSymbols)
 
void writeSegmentLoadCommand (StringRefName,unsigned NumSections,uint64_t VMAddr,uint64_t VMSize,uint64_t SectionDataStartOffset,uint64_t SectionDataSize,uint32_t MaxProt,uint32_t InitProt)
 Write a segment load command.
 
void writeSection (constMCAssembler &Asm,constMCSection &Sec,uint64_t VMAddr,uint64_t FileOffset,unsigned Flags,uint64_t RelocationsStart,unsigned NumRelocations)
 
void writeSymtabLoadCommand (uint32_t SymbolOffset,uint32_t NumSymbols,uint32_t StringTableOffset,uint32_t StringTableSize)
 
void writeDysymtabLoadCommand (uint32_t FirstLocalSymbol,uint32_t NumLocalSymbols,uint32_t FirstExternalSymbol,uint32_t NumExternalSymbols,uint32_t FirstUndefinedSymbol,uint32_t NumUndefinedSymbols,uint32_t IndirectSymbolOffset,uint32_t NumIndirectSymbols)
 
void writeNlist (MachSymbolData &MSD,constMCAssembler &Asm)
 
void writeLinkeditLoadCommand (uint32_tType,uint32_t DataOffset,uint32_t DataSize)
 
void writeLinkerOptionsLoadCommand (const std::vector< std::string > &Options)
 
void addRelocation (constMCSymbol *RelSymbol,constMCSection *Sec,MachO::any_relocation_info &MRE)
 
void recordRelocation (MCAssembler &Asm,constMCFragment *Fragment,constMCFixup &Fixup,MCValueTarget,uint64_t &FixedValue) override
 Record a relocation entry.
 
void bindIndirectSymbols (MCAssembler &Asm)
 
void computeSymbolTable (MCAssembler &Asm, std::vector< MachSymbolData > &LocalSymbolData, std::vector< MachSymbolData > &ExternalSymbolData, std::vector< MachSymbolData > &UndefinedSymbolData)
 Compute the symbol table data.
 
void computeSectionAddresses (constMCAssembler &Asm)
 
void executePostLayoutBinding (MCAssembler &Asm) override
 Perform any late binding of symbols (for example, to assign symbol indices for use when generating relocations).
 
bool isSymbolRefDifferenceFullyResolvedImpl (constMCAssembler &Asm,constMCSymbol &SymA,constMCFragment &FB,bool InSet,bool IsPCRel)const override
 
void populateAddrSigSection (MCAssembler &Asm)
 
uint64_t writeObject (MCAssembler &Asm) override
 Write the object file and returns the number of bytes written.
 
Lifetime management Methods
void reset () override
 lifetime management
 
Utility Methods
bool isFixupKindPCRel (constMCAssembler &Asm,unsigned Kind)
 
std::vector< IndirectSymbolData > & getIndirectSymbols ()
 
std::vector<DataRegionData > & getDataRegions ()
 
constllvm::SmallVectorImpl<MCSection * > & getSectionOrder ()const
 
SectionAddrMapgetSectionAddressMap ()
 
MCLOHContainergetLOHContainer ()
 
uint64_t getSectionAddress (constMCSection *Sec)const
 
uint64_t getSymbolAddress (constMCSymbol &S,constMCAssembler &Asm)const
 
uint64_t getFragmentAddress (constMCAssembler &Asm,constMCFragment *Fragment)const
 
uint64_t getPaddingSize (constMCAssembler &Asm,constMCSection *SD)const
 
constMCSymbolgetAtom (constMCSymbol &S)const
 
bool doesSymbolRequireExternRelocation (constMCSymbol &S)
 
void setVersionMin (MCVersionMinTypeType,unsignedMajor,unsignedMinor,unsignedUpdate,VersionTupleSDKVersion=VersionTuple())
 Mach-O deployment target version information.
 
void setBuildVersion (MachO::PlatformTypePlatform,unsignedMajor,unsignedMinor,unsignedUpdate,VersionTupleSDKVersion=VersionTuple())
 
void setTargetVariantBuildVersion (MachO::PlatformTypePlatform,unsignedMajor,unsignedMinor,unsignedUpdate,VersionTupleSDKVersion)
 
std::vector< std::vector< std::string > > & getLinkerOptions ()
 
Target Writer Proxy Accessors
bool is64Bit ()const
 
bool isX86_64 ()const
 
- Public Member Functions inherited fromllvm::MCObjectWriter
 MCObjectWriter (constMCObjectWriter &)=delete
 
MCObjectWriteroperator= (constMCObjectWriter &)=delete
 
virtual ~MCObjectWriter ()
 
virtual void reset ()
 lifetime management
 
bool isSymbolRefDifferenceFullyResolved (constMCAssembler &Asm,constMCSymbolRefExpr *A,constMCSymbolRefExpr *B,bool InSet)const
 Check whether the difference (A - B) between two symbol references is fully resolved.
 
MutableArrayRef< std::pair< std::string, size_t > > getFileNames ()
 
void addFileName (MCAssembler &Asm,StringRef FileName)
 
void setCompilerVersion (StringRef CompilerVers)
 
void emitAddrsigSection ()
 Tell the object writer to emit an address-significance table duringwriteObject().
 
bool getEmitAddrsigSection ()
 
void addAddrsigSymbol (constMCSymbol *Sym)
 Record the given symbol in the address-significance table to be written diringwriteObject().
 
std::vector<constMCSymbol * > & getAddrsigSyms ()
 
SmallVector<CGProfileEntry, 0 > & getCGProfile ()
 
bool getSubsectionsViaSymbols ()const
 
void setSubsectionsViaSymbols (boolValue)
 

Public Attributes

union {
   MCVersionMinType   Type
 Used when EmitBuildVersion==false.More...
 
   MachO::PlatformType   Platform
 Used when EmitBuildVersion==true.More...
 
TypeOrPlatform
 
unsigned Major
 
unsigned Minor
 
unsigned Update
 
VersionTuple SDKVersion
 An optional version of the SDK that was used to build the source.
 
support::endian::Writer W
 

Additional Inherited Members

- Protected Member Functions inherited fromllvm::MCObjectWriter
 MCObjectWriter ()=default
 
- Protected Attributes inherited fromllvm::MCObjectWriter
SmallVector< std::pair< std::string, size_t >, 0 > FileNames
 List of declared file names.
 
std::string CompilerVersion
 
std::vector<constMCSymbol * > AddrsigSyms
 
bool EmitAddrsigSection = false
 
bool SubsectionsViaSymbols = false
 
SmallVector<CGProfileEntry, 0 > CGProfile
 

Detailed Description

Definition at line86 of fileMCMachObjectWriter.h.

Member Typedef Documentation

◆ VersionInfoType

usingllvm::MachObjectWriter::VersionInfoType = {bool EmitBuildVersion

Definition at line96 of fileMCMachObjectWriter.h.

Constructor & Destructor Documentation

◆ MachObjectWriter()

llvm::MachObjectWriter::MachObjectWriter(std::unique_ptr<MCMachObjectTargetWriterMOTW,
raw_pwrite_streamOS,
bool IsLittleEndian 
)
inline

Definition at line175 of fileMCMachObjectWriter.h.

Member Function Documentation

◆ addRelocation()

void llvm::MachObjectWriter::addRelocation(constMCSymbolRelSymbol,
constMCSectionSec,
MachO::any_relocation_infoMRE 
)
inline

Definition at line325 of fileMCMachObjectWriter.h.

ReferencesP.

Referenced bypopulateAddrSigSection().

◆ bindIndirectSymbols()

void MachObjectWriter::bindIndirectSymbols(MCAssemblerAsm)

Definition at line529 of fileMachObjectWriter.cpp.

Referencesllvm::enumerate(),llvm::report_fatal_error(),llvm::MachO::S_LAZY_SYMBOL_POINTERS,llvm::MachO::S_NON_LAZY_SYMBOL_POINTERS,llvm::MachO::S_SYMBOL_STUBS, andllvm::MachO::S_THREAD_LOCAL_VARIABLE_POINTERS.

Referenced byexecutePostLayoutBinding().

◆ computeSectionAddresses()

void MachObjectWriter::computeSectionAddresses(constMCAssemblerAsm)

strictly be necessary.

Definition at line686 of fileMachObjectWriter.cpp.

Referencesllvm::alignTo(),getPaddingSize(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced byexecutePostLayoutBinding().

◆ computeSymbolTable()

void MachObjectWriter::computeSymbolTable(MCAssemblerAsm,
std::vector< MachSymbolData > & LocalSymbolData,
std::vector< MachSymbolData > & ExternalSymbolData,
std::vector< MachSymbolData > & UndefinedSymbolData 
)

Compute the symbol table data.

computeSymbolTable - Compute the symbol table data

Definition at line586 of fileMachObjectWriter.cpp.

Referencesassert(),llvm::support::endian::Writer::Endian,isSymbolLinkerVisible(),llvm::little,llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup(),llvm::sort(), andW.

Referenced bywriteObject().

◆ doesSymbolRequireExternRelocation()

bool MachObjectWriter::doesSymbolRequireExternRelocation(constMCSymbolS)

Definition at line65 of fileMachObjectWriter.cpp.

Referencesllvm::MCSymbol::isUndefined().

◆ executePostLayoutBinding()

void MachObjectWriter::executePostLayoutBinding(MCAssemblerAsm)
overridevirtual

Perform any late binding of symbols (for example, to assign symbol indices for use when generating relocations).

This routine is called by the assembler after layout and relaxation is complete.

Reimplemented fromllvm::MCObjectWriter.

Definition at line716 of fileMachObjectWriter.cpp.

ReferencesbindIndirectSymbols(), andcomputeSectionAddresses().

◆ findAliasedSymbol()

constMCSymbol & MachObjectWriter::findAliasedSymbol(constMCSymbolSym) const

Definition at line380 of fileMachObjectWriter.cpp.

Referencesllvm::MCSymbol::getVariableValue(),llvm::MCSymbol::isVariable(),llvm::Ref, andSym.

Referenced byisSymbolRefDifferenceFullyResolvedImpl(), andwriteNlist().

◆ getAtom()

constMCSymbol * MachObjectWriter::getAtom(constMCSymbolS) const

Definition at line155 of fileMachObjectWriter.cpp.

Referencesllvm::MCFragment::getAtom(),llvm::MCSymbol::getFragment(),llvm::MCFragment::getParent(),llvm::MCSymbol::isInSection(),llvm::MCAsmInfoDarwin::isSectionAtomizableBySymbols(), andisSymbolLinkerVisible().

◆ getDataRegions()

std::vector<DataRegionData > & llvm::MachObjectWriter::getDataRegions()
inline

Definition at line202 of fileMCMachObjectWriter.h.

◆ getFragmentAddress()

uint64_t MachObjectWriter::getFragmentAddress(constMCAssemblerAsm,
constMCFragmentFragment 
) const

Definition at line92 of fileMachObjectWriter.cpp.

Referencesllvm::MCFragment::getParent(), andgetSectionAddress().

◆ getIndirectSymbols()

std::vector< IndirectSymbolData > & llvm::MachObjectWriter::getIndirectSymbols()
inline

Definition at line199 of fileMCMachObjectWriter.h.

◆ getLinkerOptions()

std::vector< std::vector< std::string > > & llvm::MachObjectWriter::getLinkerOptions()
inline

Definition at line255 of fileMCMachObjectWriter.h.

◆ getLOHContainer()

MCLOHContainer & llvm::MachObjectWriter::getLOHContainer()
inline

Definition at line207 of fileMCMachObjectWriter.h.

◆ getPaddingSize()

uint64_t MachObjectWriter::getPaddingSize(constMCAssemblerAsm,
constMCSectionSD 
) const

Definition at line131 of fileMachObjectWriter.cpp.

Referencesllvm::MCSection::getAlign(),getSectionAddress(),llvm::MCSection::isVirtualSection(),llvm::offsetToAlignment(), andllvm::SmallVectorBase< Size_T >::size().

Referenced bycomputeSectionAddresses(), andwriteObject().

◆ getSectionAddress()

uint64_t llvm::MachObjectWriter::getSectionAddress(constMCSectionSec) const
inline

Definition at line209 of fileMCMachObjectWriter.h.

Referenced bygetFragmentAddress(),getPaddingSize(),getSymbolAddress(), andwriteObject().

◆ getSectionAddressMap()

SectionAddrMap & llvm::MachObjectWriter::getSectionAddressMap()
inline

Definition at line206 of fileMCMachObjectWriter.h.

◆ getSectionOrder()

constllvm::SmallVectorImpl<MCSection * > & llvm::MachObjectWriter::getSectionOrder() const
inline

Definition at line203 of fileMCMachObjectWriter.h.

◆ getSymbolAddress()

uint64_t MachObjectWriter::getSymbolAddress(constMCSymbolS,
constMCAssemblerAsm 
) const

Definition at line98 of fileMachObjectWriter.cpp.

Referencesllvm::Address,llvm::CallingConv::C,llvm::MCExpr::evaluateAsRelocatable(),llvm::MCSymbol::getFragment(),llvm::MCSymbol::getName(),llvm::Target::getName(),llvm::MCFragment::getParent(),getSectionAddress(),getSymbolAddress(),llvm::MCSymbol::getVariableValue(),llvm::MCSymbol::isVariable(), andllvm::report_fatal_error().

Referenced bygetSymbolAddress(),writeNlist(), andwriteObject().

◆ is64Bit()

bool llvm::MachObjectWriter::is64Bit() const
inline

Definition at line264 of fileMCMachObjectWriter.h.

Referenced bypopulateAddrSigSection(),writeHeader(),writeLinkerOptionsLoadCommand(),writeNlist(),writeObject(),writeSection(), andwriteSegmentLoadCommand().

◆ isFixupKindPCRel()

bool MachObjectWriter::isFixupKindPCRel(constMCAssemblerAsm,
unsigned Kind 
)

Definition at line84 of fileMachObjectWriter.cpp.

Referencesllvm::MCFixupKindInfo::FKF_IsPCRel, andllvm::MCFixupKindInfo::Flags.

◆ isSymbolRefDifferenceFullyResolvedImpl()

bool MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(constMCAssemblerAsm,
constMCSymbolSymA,
constMCFragmentFB,
bool InSet,
bool IsPCRel 
) const
overridevirtual

Reimplemented fromllvm::MCObjectWriter.

Definition at line723 of fileMachObjectWriter.cpp.

ReferencesfindAliasedSymbol(),llvm::MCFragment::getAtom(),llvm::MCSymbol::getFragment(),llvm::MCFragment::getParent(),llvm::MCSymbol::getSection(),llvm::MCSymbol::isInSection(),llvm::MCSymbol::isTemporary(),isX86_64(), andllvm::MCObjectWriter::SubsectionsViaSymbols.

◆ isX86_64()

bool llvm::MachObjectWriter::isX86_64() const
inline

Definition at line265 of fileMCMachObjectWriter.h.

Referencesllvm::MachO::CPU_TYPE_X86_64.

Referenced byisSymbolRefDifferenceFullyResolvedImpl().

◆ populateAddrSigSection()

void MachObjectWriter::populateAddrSigSection(MCAssemblerAsm)

Definition at line780 of fileMachObjectWriter.cpp.

ReferencesaddRelocation(),llvm::MachO::GENERIC_RELOC_VANILLA,llvm::MCObjectWriter::getAddrsigSyms(),is64Bit(),llvm::MachO::any_relocation_info::r_word0, andllvm::MachO::any_relocation_info::r_word1.

Referenced bywriteObject().

◆ recordRelocation()

void MachObjectWriter::recordRelocation(MCAssemblerAsm,
constMCFragmentFragment,
constMCFixupFixup,
MCValue Target,
uint64_tFixedValue 
)
overridevirtual

Record a relocation entry.

This routine is called by the assembler after layout and relaxation, and post layout binding. The implementation is responsible for storing information about the relocation so that it can be emitted duringwriteObject().

Implementsllvm::MCObjectWriter.

Definition at line515 of fileMachObjectWriter.cpp.

ReferencesFixup, andisFixupTargetValid().

◆ reset()

void MachObjectWriter::reset()
overridevirtual

lifetime management

Reimplemented fromllvm::MCObjectWriter.

Definition at line45 of fileMachObjectWriter.cpp.

Referencesllvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(),llvm::SmallVectorImpl< T >::clear(),llvm::MCLOHContainer::reset(), andllvm::MCObjectWriter::reset().

◆ setBuildVersion()

void llvm::MachObjectWriter::setBuildVersion(MachO::PlatformType Platform,
unsigned Major,
unsigned Minor,
unsigned Update,
VersionTuple SDKVersion =VersionTuple() 
)
inline

Definition at line234 of fileMCMachObjectWriter.h.

ReferencesMajor,Minor,Platform,SDKVersion, andUpdate.

◆ setTargetVariantBuildVersion()

void llvm::MachObjectWriter::setTargetVariantBuildVersion(MachO::PlatformType Platform,
unsigned Major,
unsigned Minor,
unsigned Update,
VersionTuple SDKVersion 
)
inline

Definition at line244 of fileMCMachObjectWriter.h.

ReferencesMajor,Minor,Platform,SDKVersion, andUpdate.

◆ setVersionMin()

void llvm::MachObjectWriter::setVersionMin(MCVersionMinType Type,
unsigned Major,
unsigned Minor,
unsigned Update,
VersionTuple SDKVersion =VersionTuple() 
)
inline

Mach-O deployment target version information.

Definition at line224 of fileMCMachObjectWriter.h.

ReferencesMajor,Minor,SDKVersion,Type, andUpdate.

◆ writeDysymtabLoadCommand()

void MachObjectWriter::writeDysymtabLoadCommand(uint32_t FirstLocalSymbol,
uint32_t NumLocalSymbols,
uint32_t FirstExternalSymbol,
uint32_t NumExternalSymbols,
uint32_t FirstUndefinedSymbol,
uint32_t NumUndefinedSymbols,
uint32_t IndirectSymbolOffset,
uint32_t NumIndirectSymbols 
)

Definition at line332 of fileMachObjectWriter.cpp.

Referencesassert(),llvm::support::endian::Writer::OS,llvm::raw_ostream::tell(),W, andllvm::support::endian::Writer::write().

Referenced bywriteObject().

◆ writeHeader()

void MachObjectWriter::writeHeader(MachO::HeaderFileType Type,
unsigned NumLoadCommands,
unsigned LoadCommandsSize,
bool SubsectionsViaSymbols 
)

Definition at line174 of fileMachObjectWriter.cpp.

Referencesassert(),llvm::MachO::CPU_SUBTYPE_ARM64E,llvm::MachO::CPU_SUBTYPE_ARM64E_WITH_PTRAUTH_VERSION(),llvm::MachO::CPU_TYPE_ARM64,is64Bit(),llvm::MachO::MH_MAGIC,llvm::MachO::MH_MAGIC_64,llvm::MachO::MH_SUBSECTIONS_VIA_SYMBOLS,llvm::support::endian::Writer::OS,llvm::MCObjectWriter::SubsectionsViaSymbols,llvm::raw_ostream::tell(),Type,W, andllvm::support::endian::Writer::write().

Referenced bywriteObject().

◆ writeLinkeditLoadCommand()

void MachObjectWriter::writeLinkeditLoadCommand(uint32_t Type,
uint32_t DataOffset,
uint32_t DataSize 
)

Definition at line460 of fileMachObjectWriter.cpp.

Referencesassert(),llvm::support::endian::Writer::OS,llvm::raw_ostream::tell(),Type,W, andllvm::support::endian::Writer::write().

Referenced bywriteObject().

◆ writeLinkerOptionsLoadCommand()

void MachObjectWriter::writeLinkerOptionsLoadCommand(const std::vector< std::string > & Options)

Definition at line483 of fileMachObjectWriter.cpp.

Referencesassert(),ComputeLinkerOptionsLoadCommandSize(),is64Bit(),llvm::offsetToAlignment(),Options,llvm::support::endian::Writer::OS,Size,llvm::raw_ostream::tell(),W,llvm::support::endian::Writer::write(), andllvm::raw_ostream::write_zeros().

Referenced bywriteObject().

◆ writeNlist()

void MachObjectWriter::writeNlist(MachSymbolData & MSD,
constMCAssemblerAsm 
)

Definition at line392 of fileMachObjectWriter.cpp.

Referencesllvm::Address,llvm::Data,findAliasedSymbol(),getSymbolAddress(),is64Bit(),llvm::MachO::N_ABS,llvm::MachO::N_EXT,llvm::MachO::N_INDR,llvm::MachO::N_PEXT,llvm::MachO::N_SECT,llvm::MachO::N_UNDF,llvm::support::endian::Writer::OS,W, andllvm::support::endian::Writer::write().

Referenced bywriteObject().

◆ writeObject()

uint64_t MachObjectWriter::writeObject(MCAssemblerAsm)
overridevirtual

Write the object file and returns the number of bytes written.

This routine is called by the assembler after layout and relaxation is complete, fixups have been evaluated and applied, and relocations generated.

Implementsllvm::MCObjectWriter.

Definition at line794 of fileMachObjectWriter.cpp.

Referencesllvm::Address,llvm::alignTo(),assert(),llvm::MCSection::begin(),llvm::MCObjectWriter::CGProfile,ComputeLinkerOptionsLoadCommandSize(),computeSymbolTable(),llvm::Data,llvm::dbgs(),llvm::MCLOHContainer::emit(),End,llvm::support::endian::Writer::Endian,llvm::MCLOHContainer::getEmitSize(),getLCFromMCVM(),llvm::SectionKind::getMetadata(),getPaddingSize(),getSectionAddress(),getSymbolAddress(),llvm::MachO::INDIRECT_SYMBOL_ABS,llvm::MachO::INDIRECT_SYMBOL_LOCAL,is64Bit(),LLVM_DEBUG,llvm::MachO::MH_OBJECT,Minor,llvm::offsetToAlignment(),llvm::support::endian::Writer::OS,OS,populateAddrSigSection(),llvm::report_fatal_error(),llvm::reverse(),llvm::MachO::S_ATTR_SOME_INSTRUCTIONS,llvm::MachO::S_NON_LAZY_SYMBOL_POINTERS,SDKVersion,Size,llvm::MCObjectWriter::SubsectionsViaSymbols,llvm::raw_ostream::tell(),Update,llvm::MachO::VM_PROT_EXECUTE,llvm::MachO::VM_PROT_READ,llvm::MachO::VM_PROT_WRITE,W,llvm::support::endian::Writer::write(),llvm::support::endian::write(),llvm::raw_ostream::write_zeros(),writeDysymtabLoadCommand(),writeHeader(),writeLinkeditLoadCommand(),writeLinkerOptionsLoadCommand(),writeNlist(),writeSection(),writeSegmentLoadCommand(), andwriteSymtabLoadCommand().

◆ writeSection()

void MachObjectWriter::writeSection(constMCAssemblerAsm,
constMCSectionSec,
uint64_t VMAddr,
uint64_t FileOffset,
unsigned Flags,
uint64_t RelocationsStart,
unsigned NumRelocations 
)

Definition at line266 of fileMachObjectWriter.cpp.

Referencesassert(),is64Bit(),llvm::Log2(),llvm::support::endian::Writer::OS,llvm::raw_ostream::tell(),W, andllvm::support::endian::Writer::write().

Referenced bywriteObject().

◆ writeSegmentLoadCommand()

void MachObjectWriter::writeSegmentLoadCommand(StringRef Name,
unsigned NumSections,
uint64_t VMAddr,
uint64_t VMSize,
uint64_t SectionDataStartOffset,
uint64_t SectionDataSize,
uint32_t MaxProt,
uint32_t InitProt 
)

Write a segment load command.

writeSegmentLoadCommand - Write a segment load command.

Parameters
NumSectionsThe number of sections in this segment.
SectionDataSizeThe total size of the sections.

Definition at line226 of fileMachObjectWriter.cpp.

Referencesassert(),is64Bit(),Name,llvm::support::endian::Writer::OS,llvm::raw_ostream::tell(),W, andllvm::support::endian::Writer::write().

Referenced bywriteObject().

◆ writeSymtabLoadCommand()

void MachObjectWriter::writeSymtabLoadCommand(uint32_t SymbolOffset,
uint32_t NumSymbols,
uint32_t StringTableOffset,
uint32_t StringTableSize 
)

Definition at line313 of fileMachObjectWriter.cpp.

Referencesassert(),llvm::support::endian::Writer::OS,llvm::raw_ostream::tell(),W, andllvm::support::endian::Writer::write().

Referenced bywriteObject().

Member Data Documentation

◆ Major

unsigned llvm::MachObjectWriter::Major

Definition at line102 of fileMCMachObjectWriter.h.

Referenced bysetBuildVersion(),setTargetVariantBuildVersion(), andsetVersionMin().

◆ Minor

unsigned llvm::MachObjectWriter::Minor

Definition at line103 of fileMCMachObjectWriter.h.

Referenced bysetBuildVersion(),setTargetVariantBuildVersion(),setVersionMin(), andwriteObject().

◆ Platform

MachO::PlatformType llvm::MachObjectWriter::Platform

Used when EmitBuildVersion==true.

Definition at line100 of fileMCMachObjectWriter.h.

Referenced bysetBuildVersion(), andsetTargetVariantBuildVersion().

◆ SDKVersion

VersionTuple llvm::MachObjectWriter::SDKVersion

An optional version of the SDK that was used to build the source.

Definition at line106 of fileMCMachObjectWriter.h.

Referenced bysetBuildVersion(),setTargetVariantBuildVersion(),setVersionMin(), andwriteObject().

◆ Type

MCVersionMinType llvm::MachObjectWriter::Type

Used when EmitBuildVersion==false.

Definition at line99 of fileMCMachObjectWriter.h.

Referenced bysetVersionMin(),writeHeader(), andwriteLinkeditLoadCommand().

◆ 

union { ... } llvm::MachObjectWriter::TypeOrPlatform

◆ Update

unsigned llvm::MachObjectWriter::Update

Definition at line104 of fileMCMachObjectWriter.h.

Referenced bysetBuildVersion(),setTargetVariantBuildVersion(),setVersionMin(), andwriteObject().

◆ W

support::endian::Writer llvm::MachObjectWriter::W

Definition at line183 of fileMCMachObjectWriter.h.

Referenced bycomputeSymbolTable(),llvm::MCLOHDirective::emit(),writeDysymtabLoadCommand(),writeHeader(),writeLinkeditLoadCommand(),writeLinkerOptionsLoadCommand(),writeNlist(),writeObject(),writeSection(),writeSegmentLoadCommand(), andwriteSymtabLoadCommand().


The documentation for this class was generated from the following files:

Generated on Sun Jul 20 2025 19:10:49 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp