50 void MCObjectFileInfo::initMachOMCObjectFileInfo(
const Triple &
T) {
55 "__TEXT",
"__eh_frame",
297 void MCObjectFileInfo::initELFMCObjectFileInfo(
const Triple &T,
bool Large) {
452 ".debug_str.dwo", DebugSecType,
476 Ctx->
getELFSection(
".eh_frame", EHSectionType, EHSectionFlags);
481 void MCObjectFileInfo::initCOFFMCObjectFileInfo(
const Triple &T) {
576 ".debug_gnu_pubnames",
581 ".debug_gnu_pubtypes",
591 ".debug_str_offsets",
646 ".debug_str_offsets.dwo",
722 void MCObjectFileInfo::initWasmMCObjectFileInfo(
const Triple &T) {
761 bool LargeCodeModel) {
762 PositionIndependent = PIC;
787 initMachOMCObjectFileInfo(TT);
792 "Cannot initialize MC for non-Windows COFF object files.");
795 initCOFFMCObjectFileInfo(TT);
799 initELFMCObjectFileInfo(TT, LargeCodeModel);
803 initWasmMCObjectFileInfo(TT);
811 MCSection *MCObjectFileInfo::getDwarfComdatSection(
const char *
Name,
812 uint64_t Hash)
const {
822 "format: not implemented.");
837 GroupName = Group->getName();
843 unsigned UniqueID = It.first->second;
846 GroupName, UniqueID, cast<MCSymbolELF>(Link));
const MCAsmInfo * getAsmInfo() const
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
Instances of this class represent a uniqued identifier for a section in the current translation unit...
MCSection * MergeableConst4Section
static SectionKind getData()
MCSection * DwarfStrOffSection
The DWARF v5 string offset and address table sections.
S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
bool isMacOSX() const
isMacOSX - Is this a Mac OS X triple.
MCSection * DwarfPubTypesSection
MCSection * DwarfGnuPubTypesSection
Section for newer gnu pubtypes.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
MCSection * StackMapSection
StackMap section.
MCSection * ConstDataSection
MCSection * SixteenByteConstantSection
MCSection * DwarfRnglistsSection
The DWARF v5 range list section.
MCSection * TextSection
Section directive for standard text.
MCSection * ConstTextCoalSection
MCSection * DataCoalSection
MCSectionWasm * getWasmSection(const Twine &Section, SectionKind K)
MCSection * LazySymbolPointerSection
static SectionKind getMergeableConst8()
static SectionKind getMergeableConst16()
static SectionKind getMergeable1ByteCString()
S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.
static SectionKind getMergeableConst4()
static bool useCompactUnwind(const Triple &T)
MCSectionCOFF * getCOFFSection(StringRef Section, unsigned Characteristics, SectionKind Kind, StringRef COMDATSymName, int Selection, unsigned UniqueID=GenericSectionID, const char *BeginSymName=nullptr)
MCSection * DwarfInfoDWOSection
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
MCSection * MergeableConst32Section
MCSection * DwarfDebugNamesSection
Accelerator table sections.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
S_4BYTE_LITERALS - Section with 4 byte literals.
static SectionKind getBSS()
MCSection * DwarfLocDWOSection
MCSection * COFFDebugTypesSection
MCSection * MergeableConst16Section
MCSection * DwarfPubNamesSection
MCSection * DwarfLineSection
S_8BYTE_LITERALS - Section with 8 byte literals.
MCSection * EightByteConstantSection
MCSection * getStackSizesSection(const MCSection &TextSec) const
MCSection * DwarfFrameSection
MCSection * TLSDataSection
Section directive for Thread Local data. ELF, MachO, COFF, and Wasm.
Context object for machine code objects.
MCSection * DwarfStrDWOSection
MCSection * DataCommonSection
const MCSection * DwarfDebugInlineSection
MCSectionMachO * getMachOSection(StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind K, const char *BeginSymName=nullptr)
Return the MCSection for the specified mach-o section.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.
MCSection * ConstDataCoalSection
MCSection * DrectveSection
COFF specific sections.
bool isiOS() const
Is this an iOS triple.
MCSection * DwarfAccelNamesSection
MCSection * DataSection
Section directive for standard data.
MCSection * DwarfCUIndexSection
bool isOSWindows() const
Tests whether the OS is Windows.
MCSection * ThreadLocalPointerSection
MCSection * DwarfLineStrSection
const MCSymbolELF * getGroup() const
MCSection * DwarfSwiftASTSection
MCSection * TLSTLVSection
Section for thread local structure information.
S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.
MCSection * DwarfStrSection
MCSection * DwarfAccelNamespaceSection
S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.
MCSection * UStringSection
S_THREAD_LOCAL_REGULAR - Thread local data section.
bool SupportsCompactUnwindWithoutEHFrame
True if the target object file supports emitting a compact unwind section without an associated EH fr...
S_CSTRING_LITERALS - Section with literal C strings.
bool CommDirectiveSupportsAlignment
True if .comm supports alignment.
MCSection * DwarfInfoSection
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Triple - Helper class for working with autoconf configuration names.
MCSection * COFFDebugSymbolsSection
MCSection * DwarfAbbrevSection
MCSection * EHFrameSection
EH frame section.
MCSection * DwarfLoclistsSection
The DWARF v5 locations list section.
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
MCSection * DwarfTypesDWOSection
static SectionKind getThreadBSS()
MCSection * DwarfAddrSection
MCSection * DwarfLineDWOSection
MCSection * DwarfRangesSection
S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread local structures.
static SectionKind getMetadata()
static SectionKind getReadOnlyWithRel()
MCSymbol * getBeginSymbol()
MCSection * DwarfARangesSection
MCSection * DataBSSSection
MCSection * CompactUnwindSection
If exception handling is supported by the target and the target can support a compact representation ...
MCSection * DwarfAccelTypesSection
S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local variable initialization pointers to...
DenseMap< const MCSymbol *, unsigned > StackSizesUniquing
std::string utostr(uint64_t X, bool isNeg=false)
MCSection * DwarfStrOffDWOSection
S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be in a ranlib table of contents...
S_16BYTE_LITERALS - Section with only 16 byte literals.
MCSection * DwarfGnuPubNamesSection
Section for newer gnu pubnames.
bool isMIPS() const
Tests whether the target is MIPS (little and big endian, 32- or 64-bit).
MCSection * DwarfAbbrevDWOSection
MCSection * FaultMapSection
FaultMap section.
bool OmitDwarfIfHaveCompactUnwind
OmitDwarfIfHaveCompactUnwind - True if the target object file supports having some functions with com...
MCSection * FourByteConstantSection
static SectionKind getMergeable2ByteCString()
void InitMCObjectFileInfo(const Triple &TT, bool PIC, MCContext &ctx, bool LargeCodeModel=false)
MCSection * SXDataSection
unsigned FDECFIEncoding
FDE CFI encoding.
S_ATTR_DEBUG - A debug section.
MCSection * LSDASection
If exception handling is supported by the target, this is the section the Language Specific Data Area...
MCSection * TLSExtraDataSection
Extra TLS Variable Data section.
ObjectFormatType getObjectFormat() const
getFormat - Get the object format for this triple.
unsigned CompactUnwindDwarfEHFrameOnly
Compact unwind encoding indicating that we should emit only an EH frame.
MCSection * StackSizesSection
Section containing metadata on function stack sizes.
This represents a section on linux, lots of unix variants and some bare metal systems.
bool isMacOSXVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
isMacOSXVersionLT - Comparison function for checking OS X version compatibility, which handles suppor...
MCSection * DwarfAccelObjCSection
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
S_COALESCED - Section contains symbols that are to be coalesced.
MCSection * COFFGlobalTypeHashesSection
MCSection * TLSBSSSection
Section directive for Thread Local uninitialized data.
MCSection * NonLazySymbolPointerSection
MCSection * TextCoalSection
MCSection * DwarfTUIndexSection
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
const MCSection * TLSThreadInitSection
Section for thread local data initialization functions.
MCSection * DwarfRnglistsDWOSection
The DWARF v5 range list section for fission.
MCSection * CStringSection
bool SupportsWeakOmittedEHFrame
True if target object file supports a weak_definition of constant 0 for an omitted EH frame...
MCSection * BSSSection
Section that is default initialized to zero.
StringRef - Represent a constant reference to a string, i.e.
S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section in files with the MY_DYLDLINK f...
MCSection * ReadOnlySection
Section that is readonly and can contain arbitrary initialized data.
S_ZEROFILL - Zero fill on demand section.
MCSection * DwarfMacinfoSection
MCSection * DataRelROSection
static SectionKind getReadOnly()
MCSection * DwarfLocSection
static SectionKind getText()
MCSection * MergeableConst8Section