2009-08-02 08:34:36 +08:00
|
|
|
//===-- llvm/Target/ARMTargetObjectFile.h - ARM Object Info -----*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_TARGET_ARM_TARGETOBJECTFILE_H
|
|
|
|
#define LLVM_TARGET_ARM_TARGETOBJECTFILE_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
2009-08-13 13:07:35 +08:00
|
|
|
#include "llvm/MC/MCSectionELF.h"
|
2009-08-02 08:34:36 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
2009-08-11 23:33:49 +08:00
|
|
|
|
2009-08-02 08:34:36 +08:00
|
|
|
class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
|
|
|
|
public:
|
2009-08-09 06:41:53 +08:00
|
|
|
ARMElfTargetObjectFile() : TargetLoweringObjectFileELF() {}
|
2009-08-11 23:33:49 +08:00
|
|
|
|
2009-08-02 08:34:36 +08:00
|
|
|
void Initialize(MCContext &Ctx, const TargetMachine &TM) {
|
|
|
|
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
|
2009-08-11 23:33:49 +08:00
|
|
|
|
2009-08-02 08:34:36 +08:00
|
|
|
if (TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI()) {
|
|
|
|
StaticCtorSection =
|
2009-08-13 13:07:35 +08:00
|
|
|
getELFSection(".init_array", MCSectionELF::SHT_INIT_ARRAY,
|
|
|
|
MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC,
|
2009-08-09 04:22:20 +08:00
|
|
|
SectionKind::getDataRel());
|
2009-08-02 08:34:36 +08:00
|
|
|
StaticDtorSection =
|
2009-08-13 13:07:35 +08:00
|
|
|
getELFSection(".fini_array", MCSectionELF::SHT_FINI_ARRAY,
|
|
|
|
MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC,
|
2009-08-09 04:22:20 +08:00
|
|
|
SectionKind::getDataRel());
|
2009-08-02 08:34:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|