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
16namespace llvm {
17
18class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
19 bool UsesARMEH = false;
20
21public:
22 ARMElfTargetObjectFile();
23 void initialize(MCContext &Ctx, const TargetMachine &TM,
24 const Module &M) override;
25
26 MCRegister getStaticBase() const override;
27
28 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
29 const MCSymbol *Sym,
30 const MCValue &MV, int64_t Offset,
31 MachineModuleInfo *MMI,
32 MCStreamer &Streamer) const override;
33
34 const MCExpr *getIndirectSymViaRWPI(const MCSymbol *Sym) const override;
35
36 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
37 unsigned Encoding,
38 const TargetMachine &TM,
39 MachineModuleInfo *MMI,
40 MCStreamer &Streamer) const override;
41
42 /// Describe a TLS variable address within debug info.
43 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
44
45 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind,
46 const TargetMachine &TM) const override;
47
48 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
49 const TargetMachine &TM) const override;
50};
51
52} // end namespace llvm
53
54#endif // LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H
55