summaryrefslogtreecommitdiff
path: root/lib/MC/MCSectionELF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCSectionELF.cpp')
-rw-r--r--lib/MC/MCSectionELF.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp
index b4448d79a2d5b..5a0bb7fe986fb 100644
--- a/lib/MC/MCSectionELF.cpp
+++ b/lib/MC/MCSectionELF.cpp
@@ -27,12 +27,7 @@ bool MCSectionELF::ShouldOmitSectionDirective(StringRef Name,
if (isUnique())
return false;
- // FIXME: Does .section .bss/.data/.text work everywhere??
- if (Name == ".text" || Name == ".data" ||
- (Name == ".bss" && !MAI.usesELFSectionDirectiveForBSS()))
- return true;
-
- return false;
+ return MAI.shouldOmitSectionDirective(Name);
}
static void printName(raw_ostream &OS, StringRef Name) {
@@ -138,6 +133,8 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI,
OS << "note";
else if (Type == ELF::SHT_PROGBITS)
OS << "progbits";
+ else if (Type == ELF::SHT_X86_64_UNWIND)
+ OS << "unwind";
if (EntrySize) {
assert(Flags & ELF::SHF_MERGE);