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/MCContext.h" 13#include "llvm/MC/MCSectionELF.h" 14#include "llvm/Support/Dwarf.h" 15#include "llvm/Support/ELF.h" 16#include "llvm/Target/TargetMachine.h" 17#include "llvm/ADT/StringExtras.h" 18using namespace llvm; 19using namespace dwarf; 20 21//===----------------------------------------------------------------------===// 22// ELF Target 23//===----------------------------------------------------------------------===// 24 25void ARMElfTargetObjectFile::Initialize(MCContext &Ctx, 26 const TargetMachine &TM) { 27 bool isAAPCS_ABI = TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI(); 28 TargetLoweringObjectFileELF::Initialize(Ctx, TM); 29 InitializeELF(isAAPCS_ABI); 30 31 if (isAAPCS_ABI) { 32 LSDASection = NULL; 33 } 34 35 AttributesSection = 36 getContext().getELFSection(".ARM.attributes", 37 ELF::SHT_ARM_ATTRIBUTES, 38 0, 39 SectionKind::getMetadata()); 40} 41