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);
diff --git a/lld/test/elf/sections.objtxt b/lld/test/elf/sections.objtxt
index 929abf2..74ad2e1 100644
--- a/lld/test/elf/sections.objtxt
+++ b/lld/test/elf/sections.objtxt
@@ -3,31 +3,32 @@
 RUN: elf-dump  --dump-section %t1 |  FileCheck -check-prefix=ED %s 
 
 OBJDUMP:  0 000000000 00000000000000000
-OBJDUMP:  2 .anotherspecial 000000004 000000000000001c8 DATA
-OBJDUMP:  3 .special      000000004 000000000000001cc DATA
-OBJDUMP:  4 .text         00000000a 000000000000001d0 TEXT DATA
-OBJDUMP:  5 .data         000000004 000000000000001dc DATA
-OBJDUMP:  7 .symtab       000000150 000000000000001e0
-OBJDUMP:  8 .strtab       00000003b 00000000000000330
-OBJDUMP:  9 .shstrtab     00000004b 0000000000000036b
+OBJDUMP:  1 .anotherspecial 000000004 000000000000001a0 DATA
+OBJDUMP:  2 .special      000000004 000000000000001a4 DATA
+OBJDUMP:  3 .bss          000000001 000000000000001a8 
+OBJDUMP:  4 .text         00000000a 000000000000001ac TEXT DATA
+OBJDUMP:  5 .data         000000004 000000000000001b8 DATA
+OBJDUMP:  6 .symtab       000000140 000000000000001bc
+OBJDUMP:  7 .strtab       00000003b 000000000000002fc
+OBJDUMP:  8 .shstrtab     000000045 00000000000000337
 
 READOBJ: File Format : ELF32-i386
 READOBJ: Arch        : i386
 READOBJ: Address Size: 32 bits
 READOBJ: Symbols
-READOBJ: .anotherspecial                   DBG                1c8                 0               1c8  formatspecific
-READOBJ: .symtab                           DBG                1e0                 0               1e0  formatspecific
-READOBJ: baz                               FUNC               0                 a               1d0  global
-READOBJ:  z                                 DATA               0                 4               1c8  global
-READOBJ: Total: 20
+READOBJ: .anotherspecial                   DBG                1a0                 0               1a0  formatspecific
+READOBJ: .symtab                           DBG                1bc                 0               1bc  formatspecific
+READOBJ: baz                               FUNC               0                 a               1ac  global
+READOBJ:  z                                 DATA               0                 4               1a0  global
+READOBJ: Total: 19
 
 ED: 'e_indent[EI_DATA]', 0x01
 ED: 'e_machine', 0x0003
 ED: Section 1
-ED: 'sh_addralign', 0x00000001
-ED: Section 2
 ED: 'sh_addralign', 0x00000008
-ED: Section 7
-ED: 'sh_link', 0x00000008
+ED: Section 2
+ED: 'sh_addralign', 0x00000004
+ED: Section 6
+ED: 'sh_link', 0x00000007
 ED: 'sh_addralign', 0x00000004
 ED: 'sh_entsize', 0x00000010