LLVM API Documentation
00001 //===-- llvm/Target/ARMTargetObjectFile.h - ARM Object Info -----*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 00010 #ifndef LLVM_TARGET_ARM_TARGETOBJECTFILE_H 00011 #define LLVM_TARGET_ARM_TARGETOBJECTFILE_H 00012 00013 #include "llvm/Target/TargetLoweringObjectFile.h" 00014 #include "llvm/MC/MCSectionELF.h" 00015 00016 namespace llvm { 00017 00018 class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF { 00019 public: 00020 ARMElfTargetObjectFile() : TargetLoweringObjectFileELF() {} 00021 00022 void Initialize(MCContext &Ctx, const TargetMachine &TM) { 00023 TargetLoweringObjectFileELF::Initialize(Ctx, TM); 00024 00025 if (TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI()) { 00026 StaticCtorSection = 00027 getELFSection(".init_array", MCSectionELF::SHT_INIT_ARRAY, 00028 MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC, 00029 SectionKind::getDataRel()); 00030 StaticDtorSection = 00031 getELFSection(".fini_array", MCSectionELF::SHT_FINI_ARRAY, 00032 MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC, 00033 SectionKind::getDataRel()); 00034 } 00035 } 00036 }; 00037 } // end namespace llvm 00038 00039 #endif