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() {}
25 ~NVPTXTargetObjectFile() {
29 delete ReadOnlySection;
31 delete StaticCtorSection;
32 delete StaticDtorSection;
34 delete EHFrameSection;
35 delete DwarfAbbrevSection;
36 delete DwarfInfoSection;
37 delete DwarfLineSection;
38 delete DwarfFrameSection;
39 delete DwarfPubTypesSection;
40 delete DwarfDebugInlineSection;
41 delete DwarfStrSection;
42 delete DwarfLocSection;
43 delete DwarfARangesSection;
44 delete DwarfRangesSection;
45 delete DwarfMacroInfoSection;
48 virtual void Initialize(MCContext &ctx, const TargetMachine &TM) {
49 TextSection = new NVPTXSection(MCSection::SV_ELF, SectionKind::getText());
51 new NVPTXSection(MCSection::SV_ELF, SectionKind::getDataRel());
52 BSSSection = new NVPTXSection(MCSection::SV_ELF, SectionKind::getBSS());
54 new NVPTXSection(MCSection::SV_ELF, SectionKind::getReadOnly());
57 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
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());
72 DwarfPubTypesSection =
73 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
74 DwarfDebugInlineSection =
75 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
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());
84 DwarfMacroInfoSection =
85 new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata());
88 virtual const MCSection *getSectionForConstant(SectionKind Kind) const {
89 return ReadOnlySection;
92 virtual const MCSection *
93 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
94 Mangler *Mang, const TargetMachine &TM) const {
100 } // end namespace llvm