xref: /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetObjectFile.h (revision 5e801ac66d24704442eba426ed13c3effb8a34e7)
1 //===-- llvm/Target/ARMTargetObjectFile.h - ARM Object Info -----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H
11 
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
13 #include "llvm/MC/MCExpr.h"
14 #include "llvm/MC/MCRegister.h"
15 
16 namespace llvm {
17 
18 class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
19 public:
20   ARMElfTargetObjectFile()
21       : TargetLoweringObjectFileELF() {
22     PLTRelativeVariantKind = MCSymbolRefExpr::VK_ARM_PREL31;
23   }
24 
25   void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
26 
27   const MCRegister getStaticBase() const override;
28 
29   const MCExpr *getIndirectSymViaRWPI(const MCSymbol *Sym) const override;
30 
31   const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
32                                         unsigned Encoding,
33                                         const TargetMachine &TM,
34                                         MachineModuleInfo *MMI,
35                                         MCStreamer &Streamer) const override;
36 
37   /// Describe a TLS variable address within debug info.
38   const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
39 
40   MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind,
41                                       const TargetMachine &TM) const override;
42 
43   MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
44                                     const TargetMachine &TM) const override;
45 };
46 
47 } // end namespace llvm
48 
49 #endif // LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H
50