1 //===-- NVPTXTargetObjectFile.h - NVPTX Object Info -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_TARGET_NVPTX_TARGETOBJECTFILE_H
11 #define LLVM_TARGET_NVPTX_TARGETOBJECTFILE_H
13 #include "NVPTXSection.h"
14 #include "llvm/Target/TargetLoweringObjectFile.h"
21 class NVPTXTargetObjectFile : public TargetLoweringObjectFile {
24 NVPTXTargetObjectFile() {
30 StaticCtorSection = 0;
31 StaticDtorSection = 0;
34 DwarfAbbrevSection = 0;
37 DwarfFrameSection = 0;
38 DwarfPubTypesSection = 0;
39 DwarfDebugInlineSection = 0;
42 DwarfARangesSection = 0;
43 DwarfRangesSection = 0;
44 DwarfMacroInfoSection = 0;
47 virtual ~NVPTXTargetObjectFile();
49 void Initialize(MCContext &ctx, const TargetMachine &TM) LLVM_OVERRIDE {
50 TargetLoweringObjectFile::Initialize(ctx, TM);
51 TextSection = new NVPTXSection(MCSection::SV_ELF, SectionKind::getText());
53 new NVPTXSection(MCSection::SV_ELF, SectionKind::getDataRel());
54 BSSSection = new NVPTXSection(MCSection::SV_ELF, SectionKind::getBSS());
56 new NVPTXSection(MCSection::SV_ELF, SectionKind::getReadOnly());
59 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
61 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
63 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
65 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
67 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
69 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
71 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
73 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
74 DwarfPubTypesSection =
75 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
76 DwarfDebugInlineSection =
77 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
79 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
81 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
83 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
85 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
86 DwarfMacroInfoSection =
87 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
90 const MCSection *getSectionForConstant(SectionKind Kind) const LLVM_OVERRIDE {
91 return ReadOnlySection;
94 const MCSection *getExplicitSectionGlobal(const GlobalValue *GV,
95 SectionKind Kind, Mangler *Mang,
96 const TargetMachine &TM) const
103 } // end namespace llvm