LLVM: llvm::TargetLoweringObjectFileELF Class Reference (original) (raw)
Public Member Functions
~TargetLoweringObjectFileELF () override=default
void
Initialize (MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
void
getModuleMetadata (Module &M) override
Get the module-level metadata that the platform cares about.
void
emitModuleMetadata (MCStreamer &Streamer, Module &M) const override
Emit Obj-C garbage collection and linker options.
void
emitPersonalityValue (MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym, const MachineModuleInfo *MMI) const override
virtual void
emitPersonalityValueImpl (MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym, const MachineModuleInfo *MMI) const
void
emitLinkerDirectives (MCStreamer &Streamer, Module &M) const override
Process linker options metadata and emit platform-specific bits.
getSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
getSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment, StringRef SectionSuffix) const override
Similar to the function above, but append SectionSuffix to the section name.
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.
SelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
getSectionForJumpTable (const Function &F, const TargetMachine &TM) const override
getSectionForJumpTable (const Function &F, const TargetMachine &TM, const MachineJumpTableEntry *JTE) const override
getSectionForLSDA (const Function &F, const MCSymbol &FnSym, const TargetMachine &TM) const override
getSectionForMachineBasicBlock (const Function &F, const MachineBasicBlock &MBB, const TargetMachine &TM) const override
Returns a unique section for the given machine basic block.
getUniqueSectionForFunction (const Function &F, const TargetMachine &TM) const override
shouldPutJumpTableInFunctionSection (bool UsesLabelDifference, const Function &F) const override
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 type info global variable from exception handling information.
MCSymbol *
getCFIPersonalitySymbol (const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
void
InitializeELF (bool UseInitArray_)
getStaticCtorSection (unsigned Priority, const MCSymbol *KeySym) const override
getStaticDtorSection (unsigned Priority, const MCSymbol *KeySym) const override
lowerSymbolDifference (const MCSymbol *LHS, const MCSymbol *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset) const
lowerDSOLocalEquivalent (const MCSymbol *LHS, const MCSymbol *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const override
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
operator= (const TargetLoweringObjectFile &)=delete
~TargetLoweringObjectFile () override
Mangler &
getMangler () 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.
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.
SectionForGlobal (const GlobalObject *GO, const TargetMachine &TM) const
This method computes the appropriate section to emit the specified global variable or function definition.
virtual void
getNameWithPrefix (SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) 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.
getPersonalityEncoding () const
getTTypeReference (const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const
getDebugThreadLocalSymbol (const MCSymbol *Sym) const
Create a symbol reference to describe the given TLS variable when emitting the address in debug info.
lowerRelativeReference (const GlobalValue *LHS, const GlobalValue *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const
Target supports a PC-relative relocation that references the PLT of a function.
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?
supportGOTPCRelWithOffset () const
Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?
supportDebugThreadLocalLocation () const
Target supports TLS offset relocation in debug section?
virtual MCRegister
Returns the register used as static base in RWPI variants.
getIndirectSymViaRWPI (const MCSymbol *Sym) const
Get the target specific RWPI relocation.
getIndirectSymViaGOTPCRel (const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const
Get the target specific PC relative GOT entry relocation.
virtual MCSection *
getSectionForFunctionDescriptor (const Function *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
getContext () const
getSupportsCompactUnwindWithoutEHFrame () const
getOmitDwarfIfHaveCompactUnwind () const
getCompactUnwindDwarfEHFrameOnly () const
std::optional< sframe::ABI >
virtual unsigned
getTextSectionAlignment () const
getCompactUnwindSection () const
getDwarfAbbrevSection () const
getDwarfInfoSection (uint64_t Hash) const
getDwarfLineStrSection () const
getDwarfPubNamesSection () const
getDwarfPubTypesSection () const
getDwarfGnuPubNamesSection () const
getDwarfGnuPubTypesSection () const
getDwarfDebugInlineSection () const
getDwarfARangesSection () const
getDwarfRangesSection () const
getDwarfRnglistsSection () const
getDwarfLoclistsSection () const
getDwarfMacinfoSection () const
getDwarfDebugNamesSection () const
getDwarfAccelNamesSection () const
getDwarfAccelObjCSection () const
getDwarfAccelNamespaceSection () const
getDwarfAccelTypesSection () const
getDwarfInfoDWOSection () const
getDwarfTypesSection (uint64_t Hash) const
getDwarfTypesDWOSection () const
getDwarfAbbrevDWOSection () const
getDwarfStrDWOSection () const
getDwarfLineDWOSection () const
getDwarfLocDWOSection () const
getDwarfStrOffDWOSection () const
getDwarfStrOffSection () const
getDwarfRnglistsDWOSection () const
getDwarfLoclistsDWOSection () const
getDwarfMacroDWOSection () const
getDwarfMacinfoDWOSection () const
getDwarfCUIndexSection () const
getDwarfTUIndexSection () const
getDwarfSwiftASTSection () const
getCOFFDebugSymbolsSection () const
getCOFFDebugTypesSection () const
getCOFFGlobalTypeHashesSection () const
getTLSExtraDataSection () const
getCallGraphSection (const MCSection &TextSec) const
getStackSizesSection (const MCSection &TextSec) const
getBBAddrMapSection (const MCSection &TextSec) const
getKCFITrapSection (const MCSection &TextSec) const
getPseudoProbeSection (const MCSection &TextSec) const
getPseudoProbeDescSection (StringRef FuncName) const
getPCSection (StringRef Name, const MCSection *TextSec) const
getMergeableConst4Section () const
getMergeableConst8Section () const
getMergeableConst16Section () const
getMergeableConst32Section () const
getTLSThreadInitSection () const
getConstTextCoalSection () const
getConstDataCoalSection () const
getFourByteConstantSection () const
getEightByteConstantSection () const
getSixteenByteConstantSection () const
getLazySymbolPointerSection () const
getNonLazySymbolPointerSection () const
getThreadLocalPointerSection () const
isPositionIndependent () const
getSwift5ReflectionSection (llvm::binaryformat::Swift5ReflectionSectionKind ReflSectionKind)
This method must be called before any actual lowering is done.
Initialize - this method must be called before any actual lowering is done.
This specifies the current context for codegen, and gives the lowering implementations a chance to set up their default sections.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::XCoreTargetObjectFile.
Definition at line 121 of file TargetLoweringObjectFileImpl.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::aarch64_be, llvm::ARM, llvm::Triple::arm, llvm::Triple::armeb, llvm::TargetLoweringObjectFile::CallSiteEncoding, llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_indirect, llvm::dwarf::DW_EH_PE_pcrel, llvm::dwarf::DW_EH_PE_sdata4, llvm::dwarf::DW_EH_PE_sdata8, llvm::dwarf::DW_EH_PE_udata4, llvm::dwarf::DW_EH_PE_udata8, llvm::Triple::getArch(), llvm::TargetMachine::getCodeModel(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::GNUILP32, llvm::Triple::hexagon, llvm::TargetLoweringObjectFile::Initialize(), InitializeELF(), llvm::Triple::isOSFreeBSD(), llvm::MCObjectFileInfo::isPositionIndependent(), llvm::Triple::lanai, llvm::Triple::loongarch32, llvm::Triple::loongarch64, llvm::TargetLoweringObjectFile::LSDAEncoding, llvm::CodeModel::Medium, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::TargetMachine::Options, llvm::TargetLoweringObjectFile::PersonalityEncoding, llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::Triple::ppcle, llvm::Triple::riscv32, llvm::Triple::riscv32be, llvm::Triple::riscv64, llvm::Triple::riscv64be, llvm::CodeModel::Small, llvm::Triple::sparc, llvm::Triple::sparcel, llvm::Triple::sparcv9, llvm::Triple::systemz, llvm::Triple::thumb, llvm::Triple::thumbeb, llvm::TargetLoweringObjectFile::TTypeEncoding, llvm::TargetOptions::UseInitArray, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::ARMElfTargetObjectFile::Initialize(), llvm::AVRTargetObjectFile::Initialize(), llvm::CSKYELFTargetObjectFile::Initialize(), llvm::HexagonTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::M68kELFTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), llvm::RISCVELFTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), and llvm::XCoreTargetObjectFile::Initialize().