[ELF] Change default output section type to SHT_PROGBITS
authorAndrew Ng <anng.sw@gmail.com>
Tue, 23 Apr 2019 12:38:52 +0000 (12:38 +0000)
committerAndrew Ng <anng.sw@gmail.com>
Tue, 23 Apr 2019 12:38:52 +0000 (12:38 +0000)
commitccba42c7eb3cdfe7824cd4b473a9688e5738fa3a
treebbcf5c9f1cda372d1845d8004e336997c2a0f2a3
parent2769d58628f948b55891a5b3c1073080415f6c17
[ELF] Change default output section type to SHT_PROGBITS

This fixes an issue where a symbol only section at the start of a
PT_LOAD segment, causes incorrect alignment of the file offset for the
start of the segment which results in the output of an invalid ELF.

SHT_PROGBITS was the default output section type in the past.

Differential Revision: https://reviews.llvm.org/D60131

llvm-svn: 358981
lld/ELF/LinkerScript.cpp
lld/test/ELF/linkerscript/arm-exidx-order.test
lld/test/ELF/linkerscript/extend-pt-load2.test
lld/test/ELF/linkerscript/merge-sections.s
lld/test/ELF/linkerscript/orphan-phdrs.s
lld/test/ELF/linkerscript/symbol-only-align.test [new file with mode: 0644]
lld/test/ELF/linkerscript/symbol-only-flags.test