diff options
-rw-r--r-- | lld/ELF/LinkerScript.cpp | 4 | ||||
-rw-r--r-- | lld/ELF/OutputSections.cpp | 9 | ||||
-rw-r--r-- | lld/ELF/OutputSections.h | 1 | ||||
-rw-r--r-- | lld/ELF/Writer.cpp | 2 |
4 files changed, 3 insertions, 13 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 85312fb165c..4ee9e1ba374 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -375,7 +375,7 @@ void LinkerScript<ELFT>::processCommands(OutputSectionFactory &Factory) { // Add input sections to an output section. for (InputSectionBase *S : V) - Factory.addInputSec<ELFT>(S, Cmd->Name); + Factory.addInputSec(S, Cmd->Name); } } CurOutSec = nullptr; @@ -386,7 +386,7 @@ template <class ELFT> void LinkerScript<ELFT>::addOrphanSections(OutputSectionFactory &Factory) { for (InputSectionBase *S : InputSections) if (S->Live && !S->OutSec) - Factory.addInputSec<ELFT>(S, getOutputSectionName(S->Name)); + Factory.addInputSec(S, getOutputSectionName(S->Name)); } template <class ELFT> static bool isTbss(OutputSection *Sec) { diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index d095fafc354..9b7eda1a060 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -334,7 +334,6 @@ static void reportDiscarded(InputSectionBase *IS) { IS->File->getName()); } -template <class ELFT> void OutputSectionFactory::addInputSec(InputSectionBase *IS, StringRef OutsecName) { if (!IS->Live) { @@ -414,13 +413,5 @@ template void OutputSection::writeTo<ELF32BE>(uint8_t *Buf); template void OutputSection::writeTo<ELF64LE>(uint8_t *Buf); template void OutputSection::writeTo<ELF64BE>(uint8_t *Buf); -template void OutputSectionFactory::addInputSec<ELF32LE>(InputSectionBase *, - StringRef); -template void OutputSectionFactory::addInputSec<ELF32BE>(InputSectionBase *, - StringRef); -template void OutputSectionFactory::addInputSec<ELF64LE>(InputSectionBase *, - StringRef); -template void OutputSectionFactory::addInputSec<ELF64BE>(InputSectionBase *, - StringRef); } } diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index 72d3ccfeaf9..01ffc95207a 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -136,7 +136,6 @@ public: OutputSectionFactory(std::vector<OutputSection *> &OutputSections); ~OutputSectionFactory(); - template <class ELFT> void addInputSec(InputSectionBase *IS, StringRef OutsecName); private: diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index c3f68ab4747..c4795f02820 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -937,7 +937,7 @@ void Writer<ELFT>::forEachRelSec(std::function<void(InputSectionBase &)> Fn) { template <class ELFT> void Writer<ELFT>::createSections() { for (InputSectionBase *IS : InputSections) if (IS) - Factory.addInputSec<ELFT>(IS, getOutputSectionName(IS->Name)); + Factory.addInputSec(IS, getOutputSectionName(IS->Name)); sortBySymbolsOrder<ELFT>(OutputSections); sortInitFini<ELFT>(findSection(".init_array")); |