LLVM 24.0.0git
llvm::AArch64_MachoTargetObjectFile Class Reference

AArch64_MachoTargetObjectFile - This TLOF implementation is used for Darwin. More...

#include "Target/AArch64/AArch64TargetObjectFile.h"

Inheritance diagram for llvm::AArch64_MachoTargetObjectFile:
[legend]

Public Member Functions

 AArch64_MachoTargetObjectFile ()
const MCExpr * getTTypeGlobalReference (const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
 Return an MCExpr to use for a reference to the specified global variable from exception handling information.
MCSymbol * getCFIPersonalitySymbol (const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
const MCExpr * getIndirectSymViaGOTPCRel (const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
 Get the target specific PC relative GOT entry relocation.
void getNameWithPrefix (SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const override
MCSymbol * getAuthPtrSlotSymbol (const TargetMachine &TM, MachineModuleInfo *MMI, const MCSymbol *RawSym, AArch64PACKey::ID Key, uint16_t Discriminator) const
Public Member Functions inherited from llvm::TargetLoweringObjectFileMachO
 TargetLoweringObjectFileMachO ()
 ~TargetLoweringObjectFileMachO () override=default
void Initialize (MCContext &Ctx, const TargetMachine &TM) override
 This method must be called before any actual lowering is done.
MCSection * getStaticDtorSection (unsigned Priority, const MCSymbol *KeySym) const override
void emitModuleMetadata (MCStreamer &Streamer, Module &M) const override
 Emit the module flags that specify the garbage collection information.
void emitLinkerDirectives (MCStreamer &Streamer, Module &M) const override
 Process linker options metadata and emit platform-specific bits.
MCSection * SelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
MCSection * getExplicitSectionGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
 Targets should implement this method to assign a section to globals with an explicit section specfied.
MCSection * getSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment, const Function *F) const override
 Given a constant with the SectionKind, return a section that it should be placed in.
const MCExpr * getTTypeGlobalReference (const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
 The mach-o version of this method defaults to returning a stub reference.
MCSymbol * getCFIPersonalitySymbol (const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
const MCExpr * getIndirectSymViaGOTPCRel (const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
 Get MachO PC relative GOT entry relocation.
void getNameWithPrefix (SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const override
MCSection * getSectionForCommandLines () const override
 If supported, return the section to use for the llvm.commandline metadata.
Public Member Functions inherited from llvm::TargetLoweringObjectFile
 TargetLoweringObjectFile ()=default
 TargetLoweringObjectFile (const TargetLoweringObjectFile &)=delete
TargetLoweringObjectFile & operator= (const TargetLoweringObjectFile &)=delete
 ~TargetLoweringObjectFile () override
Mangler & getMangler () const
virtual void emitPersonalityValue (MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym, const MachineModuleInfo *MMI) const
void emitCGProfileMetadata (MCStreamer &Streamer, Module &M) const
 Emit Call Graph Profile metadata.
void emitPseudoProbeDescMetadata (MCStreamer &Streamer, Module &M, std::function< void(MCStreamer &Streamer)> COMDATSymEmitter=nullptr) const
 Emit pseudo_probe_desc metadata.
virtual void getModuleMetadata (Module &M)
 Get the module-level metadata that the platform cares about.
virtual MCSection * getSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment, const Function *F, StringRef SectionSuffix) const
 Similar to the function above, but append SectionSuffix to the section name.
virtual MCSection * getSectionForMachineBasicBlock (const Function &F, const MachineBasicBlock &MBB, const TargetMachine &TM) const
virtual MCSection * getUniqueSectionForFunction (const Function &F, const TargetMachine &TM) const
MCSection * SectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const
 This method computes the appropriate section to emit the specified global variable or function definition.
MCSection * SectionForGlobal (const GlobalObject *GO, const TargetMachine &TM) const
 This method computes the appropriate section to emit the specified global variable or function definition.
virtual MCSection * getSectionForJumpTable (const Function &F, const TargetMachine &TM) const
virtual MCSection * getSectionForJumpTable (const Function &F, const TargetMachine &TM, const MachineJumpTableEntry *JTE) const
virtual MCSection * getSectionForLSDA (const Function &, const MCSymbol &, const TargetMachine &) const
virtual bool shouldPutJumpTableInFunctionSection (bool UsesLabelDifference, const Function &F) const
MCSymbol * getSymbolWithGlobalValueBase (const GlobalValue *GV, StringRef Suffix, const TargetMachine &TM) const
 Return the MCSymbol for a private symbol with global value name as its base, with the specified suffix.
unsigned getPersonalityEncoding () const
unsigned getLSDAEncoding () const
unsigned getTTypeEncoding () const
unsigned getCallSiteEncoding () const
const MCExpr * getTTypeReference (const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const
virtual MCSection * getStaticCtorSection (unsigned Priority, const MCSymbol *KeySym) const
virtual const MCExpr * getDebugThreadLocalSymbol (const MCSymbol *Sym) const
 Create a symbol reference to describe the given TLS variable when emitting the address in debug info.
virtual const MCExpr * lowerRelativeReference (const GlobalValue *LHS, const GlobalValue *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const
bool hasPLTPCRelative () const
 Target supports a PC-relative relocation that references the PLT of a function.
virtual const MCExpr * lowerDSOLocalEquivalent (const MCSymbol *LHS, const MCSymbol *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const
bool supportIndirectSymViaGOTPCRel () const
 Target supports replacing a data "PC"-relative access to a symbol through another symbol, by accessing the later via a GOT entry instead?
bool supportGOTPCRelWithOffset () const
 Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?
bool supportDebugThreadLocalLocation () const
 Target supports TLS offset relocation in debug section?
virtual MCRegister getStaticBase () const
 Returns the register used as static base in RWPI variants.
virtual const MCExpr * getIndirectSymViaRWPI (const MCSymbol *Sym) const
 Get the target specific RWPI relocation.
virtual MCSection * getSectionForFunctionDescriptor (const GlobalObject *F, const TargetMachine &TM) const
 On targets that use separate function descriptor symbols, return a section for the descriptor given its symbol.
virtual MCSection * getSectionForTOCEntry (const MCSymbol *S, const TargetMachine &TM) const
 On targets that support TOC entries, return a section for the entry given the symbol it refers to.
virtual MCSection * getSectionForExternalReference (const GlobalObject *GO, const TargetMachine &TM) const
 On targets that associate external references with a section, return such a section for the given external global.
virtual MCSymbol * getTargetSymbol (const GlobalValue *GV, const TargetMachine &TM) const
 Targets that have a special convention for their symbols could use this hook to return a specialized symbol.
virtual MCSymbol * getFunctionEntryPointSymbol (const GlobalValue *Func, const TargetMachine &TM) const
 If supported, return the function entry point symbol.
Public Member Functions inherited from llvm::MCObjectFileInfo
void initMCObjectFileInfo (MCContext &MCCtx, bool PIC, bool LargeCodeModel=false)
virtual ~MCObjectFileInfo ()
MCContext & getContext () const
bool getSupportsCompactUnwindWithoutEHFrame () const
bool getOmitDwarfIfHaveCompactUnwind () const
unsigned getFDEEncoding () const
unsigned getCompactUnwindDwarfEHFrameOnly () const
std::optional< sframe::ABI > getSFrameABIArch () const
virtual unsigned getTextSectionAlignment () const
MCSection * getTextSection () const
MCSection * getDataSection () const
MCSection * getBSSSection () const
MCSection * getReadOnlySection () const
MCSection * getLSDASection () const
MCSection * getImportCallSection () const
MCSection * getCompactUnwindSection () const
MCSection * getDwarfAbbrevSection () const
MCSection * getDwarfInfoSection () const
MCSection * getDwarfInfoSection (uint64_t Hash) const
MCSection * getDwarfLineSection () const
MCSection * getDwarfLineStrSection () const
MCSection * getDwarfFrameSection () const
MCSection * getDwarfPubNamesSection () const
MCSection * getDwarfPubTypesSection () const
MCSection * getDwarfGnuPubNamesSection () const
MCSection * getDwarfGnuPubTypesSection () const
const MCSection * getDwarfDebugInlineSection () const
MCSection * getDwarfStrSection () const
MCSection * getDwarfLocSection () const
MCSection * getDwarfARangesSection () const
MCSection * getDwarfRangesSection () const
MCSection * getDwarfRnglistsSection () const
MCSection * getDwarfLoclistsSection () const
MCSection * getDwarfMacinfoSection () const
MCSection * getDwarfMacroSection () const
MCSection * getDwarfDebugNamesSection () const
MCSection * getDwarfAccelNamesSection () const
MCSection * getDwarfAccelObjCSection () const
MCSection * getDwarfAccelNamespaceSection () const
MCSection * getDwarfAccelTypesSection () const
MCSection * getDwarfInfoDWOSection () const
MCSection * getDwarfTypesSection (uint64_t Hash) const
MCSection * getDwarfTypesDWOSection () const
MCSection * getDwarfAbbrevDWOSection () const
MCSection * getDwarfStrDWOSection () const
MCSection * getDwarfLineDWOSection () const
MCSection * getDwarfLocDWOSection () const
MCSection * getDwarfStrOffDWOSection () const
MCSection * getDwarfStrOffSection () const
MCSection * getDwarfAddrSection () const
MCSection * getDwarfRnglistsDWOSection () const
MCSection * getDwarfLoclistsDWOSection () const
MCSection * getDwarfMacroDWOSection () const
MCSection * getDwarfMacinfoDWOSection () const
MCSection * getDwarfCUIndexSection () const
MCSection * getDwarfTUIndexSection () const
MCSection * getDwarfSwiftASTSection () const
MCSection * getCOFFDebugSymbolsSection () const
MCSection * getCOFFDebugTypesSection () const
MCSection * getCOFFGlobalTypeHashesSection () const
MCSection * getTLSExtraDataSection () const
const MCSection * getTLSDataSection () const
MCSection * getTLSBSSSection () const
MCSection * getStackMapSection () const
MCSection * getFaultMapSection () const
MCSection * getRemarksSection () const
MCSection * getCallGraphSection (const MCSection &TextSec) const
MCSection * getStackSizesSection (const MCSection &TextSec) const
MCSection * getBBAddrMapSection (const MCSection &TextSec) const
MCSection * getKCFITrapSection (const MCSection &TextSec) const
MCSection * getPseudoProbeSection (const MCSection &TextSec) const
MCSection * getPseudoProbeDescSection (StringRef FuncName, uint64_t FuncHash) const
MCSection * getLLVMStatsSection () const
MCSection * getPCSection (StringRef Name, const MCSection *TextSec) const
const MCSection * getTLSTLVSection () const
const MCSection * getTLSThreadInitSection () const
const MCSection * getCStringSection () const
const MCSection * getUStringSection () const
MCSection * getTextCoalSection () const
const MCSection * getConstTextCoalSection () const
const MCSection * getConstDataSection () const
const MCSection * getDataCoalSection () const
const MCSection * getConstDataCoalSection () const
const MCSection * getDataCommonSection () const
MCSection * getDataBSSSection () const
const MCSection * getFourByteConstantSection () const
const MCSection * getEightByteConstantSection () const
const MCSection * getSixteenByteConstantSection () const
MCSection * getLazySymbolPointerSection () const
MCSection * getNonLazySymbolPointerSection () const
MCSection * getThreadLocalPointerSection () const
MCSection * getAddrSigSection () const
MCSection * getDrectveSection () const
MCSection * getPDataSection () const
MCSection * getXDataSection () const
MCSection * getSXDataSection () const
MCSection * getGEHContSection () const
MCSection * getGFIDsSection () const
MCSection * getGIATsSection () const
MCSection * getGLJMPSection () const
MCSection * getPPA2ListSection () const
MCSection * getADASection () const
MCSection * getIDRLSection () const
MCSection * getTOCBaseSection () const
MCSection * getEHFrameSection () const
MCSection * getSFrameSection () const
bool isPositionIndependent () const
MCSection * getSwift5ReflectionSection (llvm::binaryformat::Swift5ReflectionSectionKind ReflSectionKind)

Additional Inherited Members

Static Public Member Functions inherited from llvm::TargetLoweringObjectFile
static SectionKind getKindForGlobal (const GlobalObject *GO, const TargetMachine &TM)
 Classify the specified global variable into a set of target independent categories embodied in SectionKind.
static StringRef getCustomSectionName (const GlobalObject *GO, const TargetMachine &TM)
 Return the section name specified by '#pragma clang section' or the section attribute.
Protected Attributes inherited from llvm::TargetLoweringObjectFile
bool SupportIndirectSymViaGOTPCRel = false
bool SupportGOTPCRelWithOffset = true
bool SupportDebugThreadLocalLocation = true
uint32_t PLTPCRelativeSpecifier = 0
unsigned PersonalityEncoding = 0
 PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH.
unsigned LSDAEncoding = 0
unsigned TTypeEncoding = 0
unsigned CallSiteEncoding = 0
MCSection * StaticCtorSection = nullptr
 This section contains the static constructor pointer list.
MCSection * StaticDtorSection = nullptr
 This section contains the static destructor pointer list.
const TargetMachine * TM = nullptr
Protected Attributes inherited from llvm::MCObjectFileInfo
bool SupportsCompactUnwindWithoutEHFrame = false
 True if the target object file supports emitting a compact unwind section without an associated EH frame section.
bool OmitDwarfIfHaveCompactUnwind = false
 OmitDwarfIfHaveCompactUnwind - True if the target object file supports having some functions with compact unwind and other with dwarf unwind.
unsigned FDECFIEncoding = 0
 FDE CFI encoding.
unsigned CompactUnwindDwarfEHFrameOnly = 0
 Compact unwind encoding indicating that we should emit only an EH frame.
std::optional< sframe::ABI > SFrameABIArch = {}
 SFrame ABI architecture byte.
MCSection * TextSection = nullptr
 Section directive for standard text.
MCSection * DataSection = nullptr
 Section directive for standard data.
MCSection * BSSSection = nullptr
 Section that is default initialized to zero.
MCSection * ReadOnlySection = nullptr
 Section that is readonly and can contain arbitrary initialized data.
MCSection * LSDASection = nullptr
 If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to.
MCSection * CompactUnwindSection = nullptr
 If exception handling is supported by the target and the target can support a compact representation of the CIE and FDE, this is the section to emit them into.
MCSection * ImportCallSection = nullptr
 If import call optimization is supported by the target, this is the section to emit import call data to.
MCSection * DwarfAbbrevSection = nullptr
MCSection * DwarfInfoSection = nullptr
MCSection * DwarfLineSection = nullptr
MCSection * DwarfLineStrSection = nullptr
MCSection * DwarfFrameSection = nullptr
MCSection * DwarfPubTypesSection = nullptr
const MCSection * DwarfDebugInlineSection = nullptr
MCSection * DwarfStrSection = nullptr
MCSection * DwarfLocSection = nullptr
MCSection * DwarfARangesSection = nullptr
MCSection * DwarfRangesSection = nullptr
MCSection * DwarfMacinfoSection = nullptr
MCSection * DwarfMacroSection = nullptr
MCSection * DwarfPubNamesSection = nullptr
MCSection * DwarfDebugNamesSection = nullptr
 Accelerator table sections.
MCSection * DwarfAccelNamesSection = nullptr
MCSection * DwarfAccelObjCSection = nullptr
MCSection * DwarfAccelNamespaceSection = nullptr
MCSection * DwarfAccelTypesSection = nullptr
MCSection * DwarfInfoDWOSection = nullptr
MCSection * DwarfTypesDWOSection = nullptr
MCSection * DwarfAbbrevDWOSection = nullptr
MCSection * DwarfStrDWOSection = nullptr
MCSection * DwarfLineDWOSection = nullptr
MCSection * DwarfLocDWOSection = nullptr
MCSection * DwarfStrOffDWOSection = nullptr
MCSection * DwarfMacinfoDWOSection = nullptr
MCSection * DwarfMacroDWOSection = nullptr
MCSection * DwarfStrOffSection = nullptr
 The DWARF v5 string offset and address table sections.
MCSection * DwarfAddrSection = nullptr
MCSection * DwarfRnglistsSection = nullptr
 The DWARF v5 range list section.
MCSection * DwarfLoclistsSection = nullptr
 The DWARF v5 locations list section.
MCSection * DwarfRnglistsDWOSection = nullptr
 The DWARF v5 range and location list sections for fission.
MCSection * DwarfLoclistsDWOSection = nullptr
MCSection * DwarfCUIndexSection = nullptr
MCSection * DwarfTUIndexSection = nullptr
MCSection * DwarfGnuPubNamesSection = nullptr
 Section for newer gnu pubnames.
MCSection * DwarfGnuPubTypesSection = nullptr
 Section for newer gnu pubtypes.
MCSection * DwarfSwiftASTSection = nullptr
MCSection * COFFDebugSymbolsSection = nullptr
MCSection * COFFDebugTypesSection = nullptr
MCSection * COFFGlobalTypeHashesSection = nullptr
MCSection * TLSExtraDataSection = nullptr
 Extra TLS Variable Data section.
MCSection * TLSDataSection = nullptr
 Section directive for Thread Local data. ELF, MachO, COFF, and Wasm.
MCSection * TLSBSSSection = nullptr
 Section directive for Thread Local uninitialized data.
MCSection * StackMapSection = nullptr
 StackMap section.
MCSection * FaultMapSection = nullptr
 FaultMap section.
MCSection * RemarksSection = nullptr
 Remarks section.
MCSection * EHFrameSection = nullptr
 EH frame section.
MCSection * SFrameSection = nullptr
 SFrame section.
MCSection * StackSizesSection = nullptr
 Section containing metadata on function stack sizes.
MCSection * PseudoProbeSection = nullptr
 Section for pseudo probe information used by AutoFDO.
MCSection * PseudoProbeDescSection = nullptr
MCSection * LLVMStatsSection = nullptr
MCSection * DataRelROSection = nullptr
MCSection * MergeableConst4Section = nullptr
MCSection * MergeableConst8Section = nullptr
MCSection * MergeableConst16Section = nullptr
MCSection * MergeableConst32Section = nullptr
MCSection * TLSTLVSection = nullptr
 Section for thread local structure information.
const MCSection * TLSThreadInitSection = nullptr
 Section for thread local data initialization functions.
MCSection * CStringSection = nullptr
MCSection * UStringSection = nullptr
MCSection * TextCoalSection = nullptr
MCSection * ConstTextCoalSection = nullptr
MCSection * ConstDataSection = nullptr
MCSection * DataCoalSection = nullptr
MCSection * ConstDataCoalSection = nullptr
MCSection * DataCommonSection = nullptr
MCSection * DataBSSSection = nullptr
MCSection * FourByteConstantSection = nullptr
MCSection * EightByteConstantSection = nullptr
MCSection * SixteenByteConstantSection = nullptr
MCSection * LazySymbolPointerSection = nullptr
MCSection * NonLazySymbolPointerSection = nullptr
MCSection * ThreadLocalPointerSection = nullptr
MCSection * AddrSigSection = nullptr
MCSection * DrectveSection = nullptr
 COFF specific sections.
MCSection * PDataSection = nullptr
MCSection * XDataSection = nullptr
MCSection * SXDataSection = nullptr
MCSection * GEHContSection = nullptr
MCSection * GFIDsSection = nullptr
MCSection * GIATsSection = nullptr
MCSection * GLJMPSection = nullptr
MCSection * PPA2ListSection = nullptr
MCSection * ADASection = nullptr
MCSection * IDRLSection = nullptr
MCSection * TOCBaseSection = nullptr
MCSection * ReadOnly8Section = nullptr
MCSection * ReadOnly16Section = nullptr
std::array< MCSection *, binaryformat::Swift5ReflectionSectionKind::last > Swift5ReflectionSections = {}

Detailed Description

AArch64_MachoTargetObjectFile - This TLOF implementation is used for Darwin.

Definition at line 49 of file AArch64TargetObjectFile.h.

Constructor & Destructor Documentation

◆ AArch64_MachoTargetObjectFile()

AArch64_MachoTargetObjectFile::AArch64_MachoTargetObjectFile ( )

Member Function Documentation

◆ getAuthPtrSlotSymbol()

◆ getCFIPersonalitySymbol()

MCSymbol * AArch64_MachoTargetObjectFile::getCFIPersonalitySymbol ( const GlobalValue * GV,
const TargetMachine & TM,
MachineModuleInfo * MMI ) const
overridevirtual

Reimplemented from llvm::TargetLoweringObjectFile.

Definition at line 97 of file AArch64TargetObjectFile.cpp.

References llvm::TargetLoweringObjectFile::TM.

◆ getIndirectSymViaGOTPCRel()

const MCExpr * AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel ( const GlobalValue * GV,
const MCSymbol * Sym,
const MCValue & MV,
int64_t Offset,
MachineModuleInfo * MMI,
MCStreamer & Streamer ) const
overridevirtual

◆ getNameWithPrefix()

void AArch64_MachoTargetObjectFile::getNameWithPrefix ( SmallVectorImpl< char > & OutName,
const GlobalValue * GV,
const TargetMachine & TM ) const
overridevirtual

◆ getTTypeGlobalReference()

const MCExpr * AArch64_MachoTargetObjectFile::getTTypeGlobalReference ( const GlobalValue * GV,
unsigned Encoding,
const TargetMachine & TM,
MachineModuleInfo * MMI,
MCStreamer & Streamer ) const
overridevirtual

Return an MCExpr to use for a reference to the specified global variable from exception handling information.

getTTypeGlobalReference - Return an MCExpr to use for a reference to the specified global variable from exception handling information.

Reimplemented from llvm::TargetLoweringObjectFile.

Definition at line 76 of file AArch64TargetObjectFile.cpp.

References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), llvm::MCContext::createTempSymbol(), llvm::dwarf::DW_EH_PE_indirect, llvm::dwarf::DW_EH_PE_pcrel, llvm::MCObjectFileInfo::getContext(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), llvm::AArch64::S_MACHO_GOT, Streamer, and llvm::TargetLoweringObjectFile::TM.


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