Index: ELF/OutputSections.h =================================================================== --- ELF/OutputSections.h +++ ELF/OutputSections.h @@ -297,6 +297,19 @@ static SymbolTableSection *DynSymTab; static SymbolTableSection *SymTab; }; + +template DynamicSection *Out::Dynamic; +template GotSection *Out::Got; +template HashTableSection *Out::HashTab; +template InterpSection *Out::Interp; +template OutputSection *Out::Bss; +template PltSection *Out::Plt; +template RelocationSection *Out::RelaDyn; +template StringTableSection *Out::DynStrTab; +template StringTableSection *Out::StrTab; +template SymbolTableSection *Out::DynSymTab; +template SymbolTableSection *Out::SymTab; + } } #endif Index: ELF/OutputSections.cpp =================================================================== --- ELF/OutputSections.cpp +++ ELF/OutputSections.cpp @@ -20,51 +20,6 @@ using namespace lld; using namespace lld::elf2; -template <> DynamicSection *Out::Dynamic = nullptr; -template <> DynamicSection *Out::Dynamic = nullptr; -template <> DynamicSection *Out::Dynamic = nullptr; -template <> DynamicSection *Out::Dynamic = nullptr; -template <> GotSection *Out::Got = nullptr; -template <> GotSection *Out::Got = nullptr; -template <> GotSection *Out::Got = nullptr; -template <> GotSection *Out::Got = nullptr; -template <> HashTableSection *Out::HashTab = nullptr; -template <> HashTableSection *Out::HashTab = nullptr; -template <> HashTableSection *Out::HashTab = nullptr; -template <> HashTableSection *Out::HashTab = nullptr; -template <> InterpSection *Out::Interp = nullptr; -template <> InterpSection *Out::Interp = nullptr; -template <> InterpSection *Out::Interp = nullptr; -template <> InterpSection *Out::Interp = nullptr; -template <> OutputSection *Out::Bss = nullptr; -template <> OutputSection *Out::Bss = nullptr; -template <> OutputSection *Out::Bss = nullptr; -template <> OutputSection *Out::Bss = nullptr; -template <> PltSection *Out::Plt = nullptr; -template <> PltSection *Out::Plt = nullptr; -template <> PltSection *Out::Plt = nullptr; -template <> PltSection *Out::Plt = nullptr; -template <> RelocationSection *Out::RelaDyn = nullptr; -template <> RelocationSection *Out::RelaDyn = nullptr; -template <> RelocationSection *Out::RelaDyn = nullptr; -template <> RelocationSection *Out::RelaDyn = nullptr; -template <> StringTableSection *Out::DynStrTab = nullptr; -template <> StringTableSection *Out::DynStrTab = nullptr; -template <> StringTableSection *Out::DynStrTab = nullptr; -template <> StringTableSection *Out::DynStrTab = nullptr; -template <> StringTableSection *Out::StrTab = nullptr; -template <> StringTableSection *Out::StrTab = nullptr; -template <> StringTableSection *Out::StrTab = nullptr; -template <> StringTableSection *Out::StrTab = nullptr; -template <> SymbolTableSection *Out::DynSymTab = nullptr; -template <> SymbolTableSection *Out::DynSymTab = nullptr; -template <> SymbolTableSection *Out::DynSymTab = nullptr; -template <> SymbolTableSection *Out::DynSymTab = nullptr; -template <> SymbolTableSection *Out::SymTab = nullptr; -template <> SymbolTableSection *Out::SymTab = nullptr; -template <> SymbolTableSection *Out::SymTab = nullptr; -template <> SymbolTableSection *Out::SymTab = nullptr; - template OutputSectionBase::OutputSectionBase(StringRef Name, uint32_t sh_type, uintX_t sh_flags)