llvm::SectionKind

POD value that classifies the properties of a section.

Synopsis

Declared in <llvm/MC/SectionKind.h>

class SectionKind;

Description

A section is classified into the deepest possible classification, and then the target maps them onto their sections based on what capabilities they have.

The comments below describe these as if they were an inheritance hierarchy in order to explain the predicates below.

Member Functions

NameDescription
isBSS Return true if this is a BSS section kind (local, extern, or general).
isBSSExtern Return true if this is an external-linkage BSS section kind.
isBSSLocal Return true if this is a local-linkage BSS section kind.
isCommon Return true if this is a common-linkage section kind.
isData Return true if this is initialized writable data.
isExclude Return true if this is an exclude section kind.
isExecuteOnly Return true if this is an execute-only section kind.
isGlobalWriteableData Return true if this is global writable data (BSS, common, data, or rel).
isMergeable1ByteCString Return true if this is a 1-byte mergeable C-string section kind.
isMergeable2ByteCString Return true if this is a 2-byte mergeable C-string section kind.
isMergeable4ByteCString Return true if this is a 4-byte mergeable C-string section kind.
isMergeableCString Return true if this is a mergeable C-string section kind.
isMergeableConst Return true if this is a mergeable constant-data section kind.
isMergeableConst16 Return true if this is a 16-byte mergeable constant section kind.
isMergeableConst32 Return true if this is a 32-byte mergeable constant section kind.
isMergeableConst4 Return true if this is a 4-byte mergeable constant section kind.
isMergeableConst8 Return true if this is an 8-byte mergeable constant section kind.
isMetadata Return true if this is a metadata section kind.
isReadOnly Return true if this is a read-only section kind (including mergeable).
isReadOnlyWithRel Return true if this is read-only data that requires dynamic relocations.
isText Return true if this is a text or execute-only section kind.
isThreadBSS Return true if this is a thread-local BSS section kind.
isThreadBSSLocal Return true if this is a local-linkage thread-local BSS section kind.
isThreadData Return true if this is a thread-local data section kind.
isThreadLocal Return true if this is a thread-local section kind.
isWriteable Return true if this is a writable section kind (TLS or global).

Static Member Functions

NameDescription
getBSS Return a BSS (zero-initialized writable) section kind.
getBSSExtern Return an external-linkage BSS section kind.
getBSSLocal Return a local-linkage BSS section kind.
getCommon Return a common-linkage section kind.
getData Return a section kind for writable initialized data.
getExclude Return an exclude section kind (omitted from the final image).
getExecuteOnly Return an execute-only text section kind.
getMergeable1ByteCString Return a 1-byte mergeable C-string section kind.
getMergeable2ByteCString Return a 2-byte mergeable C-string section kind.
getMergeable4ByteCString Return a 4-byte mergeable C-string section kind.
getMergeableConst16 Return a 16-byte mergeable constant section kind.
getMergeableConst32 Return a 32-byte mergeable constant section kind.
getMergeableConst4 Return a 4-byte mergeable constant section kind.
getMergeableConst8 Return an 8-byte mergeable constant section kind.
getMetadata Return a metadata section kind (debug info or other metadata).
getReadOnly Return a non-mergeable read-only data section kind.
getReadOnlyWithRel Return a SectionKind for read-only data that requires dynamic relocations.
getText Return a text section kind for executable code.
getThreadBSS Return a thread-local BSS section kind.
getThreadBSSLocal Return a local-linkage thread-local BSS section kind.
getThreadData Return a thread-local initialized data section kind.