opnsense-src/lib/Target/ARM/ARMTargetObjectFile.cpp

41 lines
1.4 KiB
C++
Raw Normal View History

2010-03-10 12:45:15 -05: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-05-04 12:11:02 -04:00
#include "llvm/MC/MCContext.h"
2010-03-10 12:45:15 -05:00
#include "llvm/MC/MCSectionELF.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/ELF.h"
2010-03-10 12:45:15 -05:00
#include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/StringExtras.h"
2010-03-10 12:45:15 -05:00
using namespace llvm;
using namespace dwarf;
//===----------------------------------------------------------------------===//
// ELF Target
//===----------------------------------------------------------------------===//
void ARMElfTargetObjectFile::Initialize(MCContext &Ctx,
const TargetMachine &TM) {
bool isAAPCS_ABI = TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI();
2010-03-10 12:45:15 -05:00
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
InitializeELF(isAAPCS_ABI);
2010-03-10 12:45:15 -05:00
if (isAAPCS_ABI) {
LSDASection = NULL;
2010-03-10 12:45:15 -05:00
}
AttributesSection =
getContext().getELFSection(".ARM.attributes",
ELF::SHT_ARM_ATTRIBUTES,
0,
SectionKind::getMetadata());
2010-03-10 12:45:15 -05:00
}