Defines the object file and target independent interfaces used by the assembler backend to write native file format object files.

Synopsis

Declared in <llvm/MC/MCObjectWriter.h>

class MCObjectWriter;

Description

The object writer contains a few callbacks used by the assembler to allow the object writer to modify the assembler data structures at appropriate points. Once assembly is complete, the object writer is given the MCAssembler instance, which contains all the symbol and section data which should be emitted as part of writeObject().

Member Functions

Name

Description

MCObjectWriter [constructor] [deleted]

Copy constructor

~MCObjectWriter [destructor] [virtual]

Destructor

operator= [deleted]

Copy assignment operator

addAddrsigSymbol

Record the given symbol in the address‐significance table to be written diring writeObject().

addFileName

emitAddrsigSection

Tell the object writer to emit an address‐significance table during writeObject(). If this function is not called, all symbols are treated as address‐significant.

executePostLayoutBinding [virtual]

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

getAddrsigSyms

getCGProfile

getContext

getEmitAddrsigSection

getFileNames

getSubsectionsViaSymbols

isSymbolRefDifferenceFullyResolved

Check whether the difference (A ‐ B) between two symbol references is fully resolved.

isSymbolRefDifferenceFullyResolvedImpl [virtual]

recordRelocation [virtual]

Record a relocation entry.

reset [virtual]

lifetime management

setAssembler [virtual]

setCompilerVersion

setSubsectionsViaSymbols

writeObject [virtual]

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

Protected Types

Protected Member Functions

Name

Description

MCObjectWriter [constructor]

Default constructor

Protected Data Members

Non-Member Functions

Name

Description

createGOFFObjectWriter

Construct a new GOFF writer instance.

createSPIRVObjectWriter

Construct a new SPIR‐V writer instance.

createWasmObjectWriter

Construct a new Wasm writer instance.

createWinCOFFObjectWriter

Construct a new Win COFF writer instance.

Derived Classes