[ELF] Delete dead SHT_NOBITS->SHT_PROGBITS code after r358981
authorFangrui Song <maskray@google.com>
Thu, 30 May 2019 15:52:11 +0000 (15:52 +0000)
committerFangrui Song <maskray@google.com>
Thu, 30 May 2019 15:52:11 +0000 (15:52 +0000)
After D60131/r358981, we no longer create SHT_NOBITS sections that may
contain ByteCommand (BYTE, SHORT, LONG, QUAD).

llvm-svn: 362108

lld/ELF/OutputSections.cpp

index becca83..8927b69 100644 (file)
@@ -273,11 +273,6 @@ static void finalizeShtGroup(OutputSection *OS,
 }
 
 void OutputSection::finalize() {
-  if (Type == SHT_NOBITS)
-    for (BaseCommand *Base : SectionCommands)
-      if (isa<ByteCommand>(Base))
-        Type = SHT_PROGBITS;
-
   std::vector<InputSection *> V = getInputSections(this);
   InputSection *First = V.empty() ? nullptr : V[0];