1 //===-- llvm/Target/ARMTargetObjectFile.h - ARM Object Info -----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
13 #include "llvm/MC/MCExpr.h"
14 #include "llvm/MC/MCRegister.h"
18 class ARMElfTargetObjectFile
: public TargetLoweringObjectFileELF
{
20 ARMElfTargetObjectFile() {
21 PLTRelativeVariantKind
= MCSymbolRefExpr::VK_ARM_PREL31
;
22 SupportIndirectSymViaGOTPCRel
= true;
25 void Initialize(MCContext
&Ctx
, const TargetMachine
&TM
) override
;
27 MCRegister
getStaticBase() const override
;
29 const MCExpr
*getIndirectSymViaGOTPCRel(const GlobalValue
*GV
,
31 const MCValue
&MV
, int64_t Offset
,
32 MachineModuleInfo
*MMI
,
33 MCStreamer
&Streamer
) const override
;
35 const MCExpr
*getIndirectSymViaRWPI(const MCSymbol
*Sym
) const override
;
37 const MCExpr
*getTTypeGlobalReference(const GlobalValue
*GV
,
39 const TargetMachine
&TM
,
40 MachineModuleInfo
*MMI
,
41 MCStreamer
&Streamer
) const override
;
43 /// Describe a TLS variable address within debug info.
44 const MCExpr
*getDebugThreadLocalSymbol(const MCSymbol
*Sym
) const override
;
46 MCSection
*getExplicitSectionGlobal(const GlobalObject
*GO
, SectionKind Kind
,
47 const TargetMachine
&TM
) const override
;
49 MCSection
*SelectSectionForGlobal(const GlobalObject
*GO
, SectionKind Kind
,
50 const TargetMachine
&TM
) const override
;
53 } // end namespace llvm
55 #endif // LLVM_LIB_TARGET_ARM_ARMTARGETOBJECTFILE_H