From d3a7e7e164ce8b95939b0c468c31597e2d33c1a4 Mon Sep 17 00:00:00 2001 From: Sid Manning Date: Wed, 26 Sep 2012 22:46:17 +0000 Subject: Add case for typeConstant in SectionChunk llvm-svn: 164732 --- lld/lib/ReaderWriter/ELF/WriterELF.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lld/lib/ReaderWriter/ELF/WriterELF.cpp') diff --git a/lld/lib/ReaderWriter/ELF/WriterELF.cpp b/lld/lib/ReaderWriter/ELF/WriterELF.cpp index e01efd11c88..139f5bd4a5b 100644 --- a/lld/lib/ReaderWriter/ELF/WriterELF.cpp +++ b/lld/lib/ReaderWriter/ELF/WriterELF.cpp @@ -329,10 +329,16 @@ SectionChunk:: break; case DefinedAtom::typeZeroFill: _segmentName = "PT_LOAD"; - _sectionName = ".bss"; + _sectionName = sectionName; _flags = ELF::SHF_ALLOC | ELF::SHF_WRITE; _type = ELF::SHT_NOBITS; break; + case DefinedAtom::typeConstant: + _segmentName = "PT_LOAD"; + _sectionName = sectionName; + _flags = ELF::SHF_ALLOC; + _type = ELF::SHT_PROGBITS; + break; default: llvm_unreachable("Unhandled content type for section!"); } -- cgit v1.2.3