LLVM 20.0.0git
Public Member Functions | Friends | List of all members
llvm::WinCOFFObjectWriter Class Referencefinal

#include "llvm/MC/MCWinCOFFObjectWriter.h"

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

Public Member Functions

 WinCOFFObjectWriter (std::unique_ptr< MCWinCOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
 
 WinCOFFObjectWriter (std::unique_ptr< MCWinCOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS, raw_pwrite_stream &DwoOS)
 
void reset () override
 lifetime management
 
void setIncrementalLinkerCompatible (bool Value)
 
void executePostLayoutBinding (MCAssembler &Asm) override
 Perform any late binding of symbols (for example, to assign symbol indices for use when generating relocations).
 
bool isSymbolRefDifferenceFullyResolvedImpl (const MCAssembler &Asm, const MCSymbol &SymA, const MCFragment &FB, bool InSet, bool IsPCRel) const override
 
void recordRelocation (MCAssembler &Asm, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue) override
 Record a relocation entry.
 
uint64_t writeObject (MCAssembler &Asm) override
 Write the object file and returns the number of bytes written.
 
- Public Member Functions inherited from llvm::MCObjectWriter
 MCObjectWriter (const MCObjectWriter &)=delete
 
MCObjectWriteroperator= (const MCObjectWriter &)=delete
 
virtual ~MCObjectWriter ()
 
virtual void reset ()
 lifetime management
 
bool isSymbolRefDifferenceFullyResolved (const MCAssembler &Asm, const MCSymbolRefExpr *A, const MCSymbolRefExpr *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 during writeObject().
 
bool getEmitAddrsigSection ()
 
void addAddrsigSymbol (const MCSymbol *Sym)
 Record the given symbol in the address-significance table to be written diring writeObject().
 
std::vector< const MCSymbol * > & getAddrsigSyms ()
 
SmallVector< CGProfileEntry, 0 > & getCGProfile ()
 
bool getSubsectionsViaSymbols () const
 
void setSubsectionsViaSymbols (bool Value)
 

Friends

class WinCOFFWriter
 

Additional Inherited Members

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

Detailed Description

Definition at line 48 of file MCWinCOFFObjectWriter.h.

Constructor & Destructor Documentation

◆ WinCOFFObjectWriter() [1/2]

WinCOFFObjectWriter::WinCOFFObjectWriter ( std::unique_ptr< MCWinCOFFObjectTargetWriter MOTW,
raw_pwrite_stream OS 
)

Definition at line 198 of file WinCOFFObjectWriter.cpp.

◆ WinCOFFObjectWriter() [2/2]

WinCOFFObjectWriter::WinCOFFObjectWriter ( std::unique_ptr< MCWinCOFFObjectTargetWriter MOTW,
raw_pwrite_stream OS,
raw_pwrite_stream DwoOS 
)

Definition at line 203 of file WinCOFFObjectWriter.cpp.

Member Function Documentation

◆ executePostLayoutBinding()

void WinCOFFObjectWriter::executePostLayoutBinding ( MCAssembler Asm)
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 from llvm::MCObjectWriter.

Definition at line 1176 of file WinCOFFObjectWriter.cpp.

◆ isSymbolRefDifferenceFullyResolvedImpl()

bool WinCOFFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl ( const MCAssembler Asm,
const MCSymbol SymA,
const MCFragment FB,
bool  InSet,
bool  IsPCRel 
) const
overridevirtual

◆ recordRelocation()

void WinCOFFObjectWriter::recordRelocation ( MCAssembler Asm,
const MCFragment Fragment,
const MCFixup Fixup,
MCValue  Target,
uint64_t FixedValue 
)
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 during writeObject().

Implements llvm::MCObjectWriter.

Definition at line 1182 of file WinCOFFObjectWriter.cpp.

References assert(), Fixup, llvm::MCFragment::getParent(), and isDwoSection().

◆ reset()

void WinCOFFObjectWriter::reset ( )
overridevirtual

lifetime management

Reimplemented from llvm::MCObjectWriter.

Definition at line 1153 of file WinCOFFObjectWriter.cpp.

References llvm::MCObjectWriter::reset().

◆ setIncrementalLinkerCompatible()

void llvm::WinCOFFObjectWriter::setIncrementalLinkerCompatible ( bool  Value)
inline

Definition at line 63 of file MCWinCOFFObjectWriter.h.

Referenced by llvm::MCWinCOFFStreamer::MCWinCOFFStreamer().

◆ writeObject()

uint64_t WinCOFFObjectWriter::writeObject ( MCAssembler Asm)
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.

Implements llvm::MCObjectWriter.

Definition at line 1191 of file WinCOFFObjectWriter.cpp.

Friends And Related Function Documentation

◆ WinCOFFWriter

friend class WinCOFFWriter
friend

Definition at line 49 of file MCWinCOFFObjectWriter.h.


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