2010-03-09 19:31:07 +01:00
|
|
|
//===-- llvm/Target/ARMTargetObjectFile.cpp - ARM Object Info Impl --------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "ARMTargetObjectFile.h"
|
|
|
|
#include "ARMSubtarget.h"
|
2010-04-08 23:34:17 +02:00
|
|
|
#include "llvm/MC/MCContext.h"
|
2010-03-09 19:31:07 +01:00
|
|
|
#include "llvm/MC/MCSectionELF.h"
|
|
|
|
#include "llvm/Support/Dwarf.h"
|
2011-01-23 05:28:49 +01:00
|
|
|
#include "llvm/Support/ELF.h"
|
2010-03-09 19:31:07 +01:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2012-01-25 23:24:19 +01:00
|
|
|
#include "llvm/ADT/StringExtras.h"
|
2010-03-09 19:31:07 +01:00
|
|
|
using namespace llvm;
|
|
|
|
using namespace dwarf;
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ELF Target
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
void ARMElfTargetObjectFile::Initialize(MCContext &Ctx,
|
|
|
|
const TargetMachine &TM) {
|
2012-06-19 02:48:28 +02:00
|
|
|
bool isAAPCS_ABI = TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI();
|
2010-03-09 19:31:07 +01:00
|
|
|
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
|
2012-06-19 02:48:28 +02:00
|
|
|
InitializeELF(isAAPCS_ABI);
|
2010-03-09 19:31:07 +01:00
|
|
|
|
2012-01-25 23:24:19 +01:00
|
|
|
if (isAAPCS_ABI) {
|
2011-03-05 19:43:15 +01:00
|
|
|
LSDASection = NULL;
|
2010-03-09 19:31:07 +01:00
|
|
|
}
|
2011-03-05 19:43:15 +01:00
|
|
|
|
2010-10-12 01:01:44 +02:00
|
|
|
AttributesSection =
|
|
|
|
getContext().getELFSection(".ARM.attributes",
|
2011-01-23 05:28:49 +01:00
|
|
|
ELF::SHT_ARM_ATTRIBUTES,
|
2010-10-12 01:01:44 +02:00
|
|
|
0,
|
|
|
|
SectionKind::getMetadata());
|
2010-03-09 19:31:07 +01:00
|
|
|
}
|