]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Target/ARM/ARMTargetObjectFile.cpp
Update LLVM to r98631.
[FreeBSD/FreeBSD.git] / lib / Target / ARM / ARMTargetObjectFile.cpp
1 //===-- llvm/Target/ARMTargetObjectFile.cpp - ARM Object Info Impl --------===//
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 //===----------------------------------------------------------------------===//
9
10 #include "ARMTargetObjectFile.h"
11 #include "ARMSubtarget.h"
12 #include "llvm/MC/MCSectionELF.h"
13 #include "llvm/Support/Dwarf.h"
14 #include "llvm/Target/TargetMachine.h"
15 using namespace llvm;
16 using namespace dwarf;
17
18 //===----------------------------------------------------------------------===//
19 //                               ELF Target
20 //===----------------------------------------------------------------------===//
21
22 void ARMElfTargetObjectFile::Initialize(MCContext &Ctx,
23                                         const TargetMachine &TM) {
24   TargetLoweringObjectFileELF::Initialize(Ctx, TM);
25
26   if (TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI()) {
27     StaticCtorSection =
28       getELFSection(".init_array", MCSectionELF::SHT_INIT_ARRAY,
29                     MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC,
30                     SectionKind::getDataRel());
31     StaticDtorSection =
32       getELFSection(".fini_array", MCSectionELF::SHT_FINI_ARRAY,
33                     MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC,
34                     SectionKind::getDataRel());
35   }
36 }