Added missing break in StockSectionChunk constructor.
Removed architecture dependent .sbss section creation.
Updated test case to show the change in section types and removal of a sbss section.
llvm-svn: 165181
diff --git a/lld/lib/ReaderWriter/ELF/WriterELF.cpp b/lld/lib/ReaderWriter/ELF/WriterELF.cpp
index c81ddaa..a47935f 100644
--- a/lld/lib/ReaderWriter/ELF/WriterELF.cpp
+++ b/lld/lib/ReaderWriter/ELF/WriterELF.cpp
@@ -397,6 +397,7 @@
break;
case DefinedAtom::typeZeroFill:
this->_type = ELF::SHT_NOBITS;
+ break;
case DefinedAtom::typeConstant:
this->_type = ELF::SHT_PROGBITS;
break;
@@ -912,9 +913,7 @@
StringRef sectionName = a->customSectionName();
if (a->sectionChoice() ==
DefinedAtom::SectionChoice::sectionBasedOnContent) {
- if (a->size() <8)
- sectionName = ".sbss";
- else
+ if (a->contentType() == DefinedAtom::typeZeroFill)
sectionName = ".bss";
}
auto pos = sectionMap.find(sectionName);