Instances of this class represent a uniqued identifier for a section in the current translation unit. The MCContext class uniques and creates these.

Synopsis

Declared in <llvm/MC/MCSection.h>

class MCSection;

Types

Name

Description

FragList

Intrusive singly‐linked list of fragments for a subsection.

iterator

Forward iterator over fragments in a section.

Member Functions

Name

Description

MCSection [constructor] [deleted]

Deleted copy constructor.

operator= [deleted]

Deleted copy assignment.

begin

Return an iterator to the first fragment in this section.

curFragList

Return the active fragment list for this section.

dump

Print a human‐readable description of this section to stderr.

end

Return an end iterator past the last fragment in this section.

ensureMinAlignment

Makes sure that Alignment is at least MinAlignment.

firstLinkerRelaxable

Return the layout order of the first linker‐relaxable fragment, or ~0u if none.

getAlign

Return the required alignment of this section.

getBeginSymbol

Return the section begin symbol, if any.

getDummyFragment

Return the dummy fragment used as a sentinel for this section.

getEndSymbol

Return the section end symbol, creating it in Ctx if needed.

getName

Return the name of this section.

getOrdinal

Return this section's index in the assembler's section list.

hasEnded

Return true if an end symbol has already been created for this section.

hasInstructions

Return true if instructions have been emitted into this section.

isBssSection

Check whether this section is "virtual", that is has no actual object file contents.

isLinkerRelaxable

Return true if this section contains any linker‐relaxable fragments.

isRegistered

Return true if this section has been registered with the assembler.

isText

Return true if this is a text (code) section.

setAlignment

Set the required alignment of this section.

setBeginSymbol

Set the section begin symbol; may be called only once.

setFirstLinkerRelaxable

Record the layout order of the first linker‐relaxable fragment.

setHasInstructions

Set whether instructions have been emitted into this section.

setIsRegistered

Set whether this section has been registered with the assembler.

setOrdinal

Set this section's index in the assembler's section list.

Static Data Members

Name

Description

NonUniqueID

Sentinel unique ID meaning the section is not uniquely identified.

Protected Member Functions

Name

Description

MCSection [constructor]

Construct a section with the given name and kind flags.

Protected Data Members

Name

Description

Name

Section name as it appears in the object file.

Friends

Name

Description

llvm::MCFragment

Contiguous piece of code or data within a section.

llvm::MCObjectStreamer

Streaming object file generation interface.

llvm::MCAssembler

Assembles machine‐code sections, lays them out, and writes object files.

Derived Classes

Name

Description

MCSectionCOFF

This represents a section on Windows

MCSectionDXContainer

This represents a section in a DXContainer (DXBC) object file.

MCSectionELF

This represents a section on linux, lots of unix variants and some bare metal systems.

MCSectionGOFF

A machine code section for the GOFF (z/OS) object file format.

MCSectionMachO

This represents a section on a Mach‐O system (used by Mac OS X). On a Mac system, these are also described in /usr/include/mach‐o/loader.h.

MCSectionSPIRV

This represents a section in a SPIR‐V object file.

MCSectionWasm

This represents a section on wasm.

MCSectionXCOFF

Represents an XCOFF control section (csect) or DWARF section.

Created with MrDocs