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