xref: /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetObjectFile.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
10b57cec5SDimitry Andric //===-- llvm/Target/ARMTargetObjectFile.h - ARM 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_ARM_ARMTARGETOBJECTFILE_H
100b57cec5SDimitry Andric #define LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H
110b57cec5SDimitry Andric 
120b57cec5SDimitry Andric #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
130b57cec5SDimitry Andric #include "llvm/MC/MCExpr.h"
14349cc55cSDimitry Andric #include "llvm/MC/MCRegister.h"
150b57cec5SDimitry Andric 
160b57cec5SDimitry Andric namespace llvm {
170b57cec5SDimitry Andric 
180b57cec5SDimitry Andric class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
190b57cec5SDimitry Andric public:
ARMElfTargetObjectFile()2004eeddc0SDimitry Andric   ARMElfTargetObjectFile() {
210b57cec5SDimitry Andric     PLTRelativeVariantKind = MCSymbolRefExpr::VK_ARM_PREL31;
22*0fca6ea1SDimitry Andric     SupportIndirectSymViaGOTPCRel = true;
230b57cec5SDimitry Andric   }
240b57cec5SDimitry Andric 
250b57cec5SDimitry Andric   void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
260b57cec5SDimitry Andric 
2704eeddc0SDimitry Andric   MCRegister getStaticBase() const override;
28349cc55cSDimitry Andric 
29*0fca6ea1SDimitry Andric   const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
30*0fca6ea1SDimitry Andric                                           const MCSymbol *Sym,
31*0fca6ea1SDimitry Andric                                           const MCValue &MV, int64_t Offset,
32*0fca6ea1SDimitry Andric                                           MachineModuleInfo *MMI,
33*0fca6ea1SDimitry Andric                                           MCStreamer &Streamer) const override;
34*0fca6ea1SDimitry Andric 
35349cc55cSDimitry Andric   const MCExpr *getIndirectSymViaRWPI(const MCSymbol *Sym) const override;
36349cc55cSDimitry Andric 
370b57cec5SDimitry Andric   const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
380b57cec5SDimitry Andric                                         unsigned Encoding,
390b57cec5SDimitry Andric                                         const TargetMachine &TM,
400b57cec5SDimitry Andric                                         MachineModuleInfo *MMI,
410b57cec5SDimitry Andric                                         MCStreamer &Streamer) const override;
420b57cec5SDimitry Andric 
430b57cec5SDimitry Andric   /// Describe a TLS variable address within debug info.
440b57cec5SDimitry Andric   const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
450b57cec5SDimitry Andric 
460b57cec5SDimitry Andric   MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind,
470b57cec5SDimitry Andric                                       const TargetMachine &TM) const override;
480b57cec5SDimitry Andric 
490b57cec5SDimitry Andric   MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
500b57cec5SDimitry Andric                                     const TargetMachine &TM) const override;
510b57cec5SDimitry Andric };
520b57cec5SDimitry Andric 
530b57cec5SDimitry Andric } // end namespace llvm
540b57cec5SDimitry Andric 
550b57cec5SDimitry Andric #endif // LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H
56