MC: Add a .debug section that we'll soon use to emit debug info into COFF files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Timur Iskhodzhanov 2014-01-28 03:48:44 +00:00
parent f555fb410e
commit 2a154dd09f
2 changed files with 13 additions and 0 deletions

View File

@ -129,6 +129,8 @@ protected:
const MCSection *DwarfGnuPubNamesSection;
const MCSection *DwarfGnuPubTypesSection;
const MCSection *COFFDebugSymbolsSection;
// Extra TLS Variable Data section. If the target needs to put additional
// information for a TLS variable, it'll go here.
const MCSection *TLSExtraDataSection;
@ -283,6 +285,10 @@ public:
return DwarfAddrSection;
}
const MCSection *getCOFFDebugSymbolsSection() const {
return COFFDebugSymbolsSection;
}
const MCSection *getTLSExtraDataSection() const {
return TLSExtraDataSection;
}

View File

@ -609,6 +609,13 @@ void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) {
SectionKind::getReadOnly());
// Debug info.
COFFDebugSymbolsSection =
Ctx->getCOFFSection(".debug$S",
COFF::IMAGE_SCN_MEM_DISCARDABLE |
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ,
SectionKind::getMetadata());
DwarfAbbrevSection =
Ctx->getCOFFSection(".debug_abbrev",
COFF::IMAGE_SCN_MEM_DISCARDABLE |