10b57cec5SDimitry Andric //===-- AArch64TargetObjectFile.h - AArch64 Object Info -*- C++ ---------*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H 100b57cec5SDimitry Andric #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" 130b57cec5SDimitry Andric #include "llvm/Target/TargetLoweringObjectFile.h" 140b57cec5SDimitry Andric 150b57cec5SDimitry Andric namespace llvm { 160b57cec5SDimitry Andric 170b57cec5SDimitry Andric /// This implementation is used for AArch64 ELF targets (Linux in particular). 180b57cec5SDimitry Andric class AArch64_ELFTargetObjectFile : public TargetLoweringObjectFileELF { 190b57cec5SDimitry Andric void Initialize(MCContext &Ctx, const TargetMachine &TM) override; 205ffd83dbSDimitry Andric 215ffd83dbSDimitry Andric public: 225ffd83dbSDimitry Andric AArch64_ELFTargetObjectFile() { 235ffd83dbSDimitry Andric PLTRelativeVariantKind = MCSymbolRefExpr::VK_PLT; 24*7a6dacacSDimitry Andric SupportIndirectSymViaGOTPCRel = true; 255ffd83dbSDimitry Andric } 26*7a6dacacSDimitry Andric 27*7a6dacacSDimitry Andric const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV, 28*7a6dacacSDimitry Andric const MCSymbol *Sym, 29*7a6dacacSDimitry Andric const MCValue &MV, int64_t Offset, 30*7a6dacacSDimitry Andric MachineModuleInfo *MMI, 31*7a6dacacSDimitry Andric MCStreamer &Streamer) const override; 320b57cec5SDimitry Andric }; 330b57cec5SDimitry Andric 340b57cec5SDimitry Andric /// AArch64_MachoTargetObjectFile - This TLOF implementation is used for Darwin. 350b57cec5SDimitry Andric class AArch64_MachoTargetObjectFile : public TargetLoweringObjectFileMachO { 360b57cec5SDimitry Andric public: 370b57cec5SDimitry Andric AArch64_MachoTargetObjectFile(); 380b57cec5SDimitry Andric 390b57cec5SDimitry Andric const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, 400b57cec5SDimitry Andric unsigned Encoding, 410b57cec5SDimitry Andric const TargetMachine &TM, 420b57cec5SDimitry Andric MachineModuleInfo *MMI, 430b57cec5SDimitry Andric MCStreamer &Streamer) const override; 440b57cec5SDimitry Andric 450b57cec5SDimitry Andric MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, 460b57cec5SDimitry Andric const TargetMachine &TM, 470b57cec5SDimitry Andric MachineModuleInfo *MMI) const override; 480b57cec5SDimitry Andric 498bcb0991SDimitry Andric const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV, 508bcb0991SDimitry Andric const MCSymbol *Sym, 510b57cec5SDimitry Andric const MCValue &MV, int64_t Offset, 520b57cec5SDimitry Andric MachineModuleInfo *MMI, 530b57cec5SDimitry Andric MCStreamer &Streamer) const override; 540b57cec5SDimitry Andric 550b57cec5SDimitry Andric void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV, 560b57cec5SDimitry Andric const TargetMachine &TM) const override; 570b57cec5SDimitry Andric }; 580b57cec5SDimitry Andric 590b57cec5SDimitry Andric /// This implementation is used for AArch64 COFF targets. 600b57cec5SDimitry Andric class AArch64_COFFTargetObjectFile : public TargetLoweringObjectFileCOFF {}; 610b57cec5SDimitry Andric 620b57cec5SDimitry Andric } // end namespace llvm 630b57cec5SDimitry Andric 640b57cec5SDimitry Andric #endif 65