diff options
| author | Hemant Kulkarni <khemant@codeaurora.org> | 2012-10-03 23:27:33 +0000 |
|---|---|---|
| committer | Hemant Kulkarni <khemant@codeaurora.org> | 2012-10-03 23:27:33 +0000 |
| commit | 8bd276120f46f0afe41779f7cfeb6843fbca52e1 (patch) | |
| tree | e3e15b6c43eea323ff64a8803b7d67bac155cac7 /lld/lib/ReaderWriter/ELF/WriterELF.cpp | |
| parent | 9e1deb69b9defa45679f24518a028c66fc8c9577 (diff) | |
| download | bcm5719-llvm-8bd276120f46f0afe41779f7cfeb6843fbca52e1.tar.gz bcm5719-llvm-8bd276120f46f0afe41779f7cfeb6843fbca52e1.zip | |
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
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/WriterELF.cpp')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/WriterELF.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/ELF/WriterELF.cpp b/lld/lib/ReaderWriter/ELF/WriterELF.cpp index c81ddaae8f7..a47935fbd0a 100644 --- a/lld/lib/ReaderWriter/ELF/WriterELF.cpp +++ b/lld/lib/ReaderWriter/ELF/WriterELF.cpp @@ -397,6 +397,7 @@ StockSectionChunk<target_endianness, is64Bits>:: break; case DefinedAtom::typeZeroFill: this->_type = ELF::SHT_NOBITS; + break; case DefinedAtom::typeConstant: this->_type = ELF::SHT_PROGBITS; break; @@ -912,9 +913,7 @@ void ELFWriter<target_endianness, is64Bits> 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); |

