summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/MC/MCObjectFileInfo.h6
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp7
2 files changed, 13 insertions, 0 deletions
diff --git a/llvm/include/llvm/MC/MCObjectFileInfo.h b/llvm/include/llvm/MC/MCObjectFileInfo.h
index 7734a157f54..cc5eb9eeeb9 100644
--- a/llvm/include/llvm/MC/MCObjectFileInfo.h
+++ b/llvm/include/llvm/MC/MCObjectFileInfo.h
@@ -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;
}
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 702ec6e421d..796d03bfeb3 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -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 |
OpenPOWER on IntegriCloud