Create sections with just assignments as STT_NOBITS.
This matches the behaviour of bfd ld. Using 0 was causing problems
with strip, which would remove these sections.
llvm-svn: 287969
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 51efa2e..5618abd 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -566,7 +566,7 @@
// '.' is assigned to, but creating these section should not have any bad
// consequeces and gives us a section to put the symbol in.
uintX_t Flags = SHF_ALLOC;
- uint32_t Type = 0;
+ uint32_t Type = SHT_NOBITS;
for (const std::unique_ptr<BaseCommand> &Base : Opt.Commands) {
auto *Cmd = dyn_cast<OutputSectionCommand>(Base.get());
if (!Cmd)