Fix part 1 of pr4682. PICADD is a 16-bit instruction even in thumb2 mode.
[llvm/avr.git] / lib / Target / ARM / ARMTargetObjectFile.h
blobec63673b62a8464baabb3e543f8df00898eabb4f
1 //===-- llvm/Target/ARMTargetObjectFile.h - ARM Object Info -----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_TARGET_ARM_TARGETOBJECTFILE_H
11 #define LLVM_TARGET_ARM_TARGETOBJECTFILE_H
13 #include "llvm/Target/TargetLoweringObjectFile.h"
15 namespace llvm {
17 class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
18 public:
19 ARMElfTargetObjectFile() : TargetLoweringObjectFileELF(true) {}
21 void Initialize(MCContext &Ctx, const TargetMachine &TM) {
22 TargetLoweringObjectFileELF::Initialize(Ctx, TM);
24 // FIXME: Add new attribute/flag to MCSection for init_array/fini_array.
25 // That will allow not treating these as "directives".
26 if (TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI()) {
27 StaticCtorSection =
28 getOrCreateSection("\t.section .init_array,\"aw\",%init_array", true,
29 SectionKind::getDataRel());
30 StaticDtorSection =
31 getOrCreateSection("\t.section .fini_array,\"aw\",%fini_array", true,
32 SectionKind::getDataRel());
36 } // end namespace llvm
38 #endif