aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCSectionCOFF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCSectionCOFF.cpp')
-rw-r--r--lib/MC/MCSectionCOFF.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/MC/MCSectionCOFF.cpp b/lib/MC/MCSectionCOFF.cpp
index fc2bd36..e95845f0 100644
--- a/lib/MC/MCSectionCOFF.cpp
+++ b/lib/MC/MCSectionCOFF.cpp
@@ -47,18 +47,22 @@ void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &MAI,
}
OS << "\t.section\t" << getSectionName() << ",\"";
- if (getKind().isText())
+ if (getCharacteristics() & COFF::IMAGE_SCN_MEM_EXECUTE)
OS << 'x';
- else if (getKind().isBSS())
- OS << 'b';
- if (getKind().isWriteable())
+ if (getCharacteristics() & COFF::IMAGE_SCN_MEM_WRITE)
OS << 'w';
- else
+ else if (getCharacteristics() & COFF::IMAGE_SCN_MEM_READ)
OS << 'r';
- if (getCharacteristics() & COFF::IMAGE_SCN_MEM_DISCARDABLE)
- OS << 'n';
+ else
+ OS << 'y';
if (getCharacteristics() & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA)
OS << 'd';
+ if (getCharacteristics() & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA)
+ OS << 'b';
+ if (getCharacteristics() & COFF::IMAGE_SCN_LNK_REMOVE)
+ OS << 'n';
+ if (getCharacteristics() & COFF::IMAGE_SCN_MEM_SHARED)
+ OS << 's';
OS << '"';
if (getCharacteristics() & COFF::IMAGE_SCN_LNK_COMDAT) {