[lld] r243509 - [ELF2] Emit correct section types.
Michael J. Spencer
bigcheesegs at gmail.com
Tue Jul 28 17:52:17 PDT 2015
Author: mspencer
Date: Tue Jul 28 19:52:17 2015
New Revision: 243509
URL: http://llvm.org/viewvc/llvm-project?rev=243509&view=rev
Log:
[ELF2] Emit correct section types.
Modified:
lld/trunk/ELF/Chunks.cpp
lld/trunk/test/elf2/basic.test
Modified: lld/trunk/ELF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Chunks.cpp?rev=243509&r1=243508&r2=243509&view=diff
==============================================================================
--- lld/trunk/ELF/Chunks.cpp (original)
+++ lld/trunk/ELF/Chunks.cpp Tue Jul 28 19:52:17 2015
@@ -19,7 +19,7 @@ using namespace lld::elf2;
template <class ELFT>
SectionChunk<ELFT>::SectionChunk(object::ELFFile<ELFT> *Obj,
const Elf_Shdr *Header)
- : Obj(Obj), Header(Header) {
+ : Chunk(SectionKind), Obj(Obj), Header(Header) {
// Initialize SectionName.
ErrorOr<StringRef> Name = Obj->getSectionName(Header);
error(Name);
Modified: lld/trunk/test/elf2/basic.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/basic.test?rev=243509&r1=243508&r2=243509&view=diff
==============================================================================
--- lld/trunk/test/elf2/basic.test (original)
+++ lld/trunk/test/elf2/basic.test Tue Jul 28 19:52:17 2015
@@ -53,7 +53,7 @@ _start:
# CHECK-NEXT: Section {
# CHECK-NEXT: Index: 1
# CHECK-NEXT: Name: (0)
-# CHECK-NEXT: Type: SHT_NULL (0x0)
+# CHECK-NEXT: Type: SHT_PROGBITS (0x1)
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x1000
@@ -67,7 +67,7 @@ _start:
# CHECK-NEXT: Section {
# CHECK-NEXT: Index: 2
# CHECK-NEXT: Name: (0)
-# CHECK-NEXT: Type: SHT_NULL (0x0)
+# CHECK-NEXT: Type: SHT_PROGBITS (0x1)
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x2000
@@ -81,7 +81,7 @@ _start:
# CHECK-NEXT: Section {
# CHECK-NEXT: Index: 3
# CHECK-NEXT: Name: (0)
-# CHECK-NEXT: Type: SHT_NULL (0x0)
+# CHECK-NEXT: Type: SHT_NOBITS (0x8)
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x2000
More information about the llvm-commits
mailing list