From ecbfd871f9aad6c13aa5af56465b2cf00fa18ba7 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 17 Feb 2017 17:35:07 +0000 Subject: Don't print DISCARD sections as gced. This is a small difference I noticed to gold and bfd. When given --print-gc-sections, we print sections a linkerscript marks DISCARD. The other linkers don't. llvm-svn: 295467 --- lld/ELF/Writer.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'lld/ELF/Writer.cpp') diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 79799f03e0b..5e790fe45fd 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -131,15 +131,6 @@ StringRef elf::getOutputSectionName(StringRef Name) { return Name; } -template void elf::reportDiscarded(InputSectionBase *IS) { - if (IS == In::ShStrTab) - error("discarding .shstrtab section is not allowed"); - if (!Config->PrintGcSections) - return; - errs() << "removing unused section from '" << IS->Name << "' in file '" - << IS->getFile()->getName() << "'\n"; -} - template static bool needsInterpSection() { return !Symtab::X->getSharedFiles().empty() && !Config->DynamicLinker.empty() && @@ -1867,8 +1858,3 @@ template bool elf::isRelroSection(const OutputSectionBase *); template bool elf::isRelroSection(const OutputSectionBase *); template bool elf::isRelroSection(const OutputSectionBase *); template bool elf::isRelroSection(const OutputSectionBase *); - -template void elf::reportDiscarded(InputSectionBase *); -template void elf::reportDiscarded(InputSectionBase *); -template void elf::reportDiscarded(InputSectionBase *); -template void elf::reportDiscarded(InputSectionBase *); -- cgit v1.2.3