Index: lld/trunk/ELF/SyntheticSections.h =================================================================== --- lld/trunk/ELF/SyntheticSections.h +++ lld/trunk/ELF/SyntheticSections.h @@ -758,14 +758,23 @@ uint64_t Size, InputSectionBase *Section); // Linker generated sections which can be used as inputs. -template struct In { +struct InX { static InputSection *ARMAttributes; - static BuildIdSection *BuildId; static BssSection *Bss; static BssSection *BssRelRo; static InputSection *Common; - static DynamicSection *Dynamic; static StringTableSection *DynStrTab; + static InputSection *Interp; + static GotPltSection *GotPlt; + static IgotPltSection *IgotPlt; + static MipsRldMapSection *MipsRldMap; + static StringTableSection *ShStrTab; + static StringTableSection *StrTab; +}; + +template struct In : public InX { + static BuildIdSection *BuildId; + static DynamicSection *Dynamic; static SymbolTableSection *DynSymTab; static EhFrameHeader *EhFrameHdr; static GnuHashTableSection *GnuHashTab; @@ -773,31 +782,20 @@ static GotSection *Got; static EhFrameSection *EhFrame; static MipsGotSection *MipsGot; - static GotPltSection *GotPlt; - static IgotPltSection *IgotPlt; static HashTableSection *HashTab; - static InputSection *Interp; - static MipsRldMapSection *MipsRldMap; static PltSection *Plt; static PltSection *Iplt; static RelocationSection *RelaDyn; static RelocationSection *RelaPlt; static RelocationSection *RelaIplt; - static StringTableSection *ShStrTab; - static StringTableSection *StrTab; static SymbolTableSection *SymTab; static VersionDefinitionSection *VerDef; static VersionTableSection *VerSym; static VersionNeedSection *VerNeed; }; -template InputSection *In::ARMAttributes; -template BssSection *In::Bss; -template BssSection *In::BssRelRo; template BuildIdSection *In::BuildId; -template InputSection *In::Common; template DynamicSection *In::Dynamic; -template StringTableSection *In::DynStrTab; template SymbolTableSection *In::DynSymTab; template EhFrameHeader *In::EhFrameHdr; template GdbIndexSection *In::GdbIndex; @@ -805,18 +803,12 @@ template GotSection *In::Got; template EhFrameSection *In::EhFrame; template MipsGotSection *In::MipsGot; -template GotPltSection *In::GotPlt; -template IgotPltSection *In::IgotPlt; template HashTableSection *In::HashTab; -template InputSection *In::Interp; -template MipsRldMapSection *In::MipsRldMap; template PltSection *In::Plt; template PltSection *In::Iplt; template RelocationSection *In::RelaDyn; template RelocationSection *In::RelaPlt; template RelocationSection *In::RelaIplt; -template StringTableSection *In::ShStrTab; -template StringTableSection *In::StrTab; template SymbolTableSection *In::SymTab; template VersionDefinitionSection *In::VerDef; template VersionTableSection *In::VerSym; Index: lld/trunk/ELF/SyntheticSections.cpp =================================================================== --- lld/trunk/ELF/SyntheticSections.cpp +++ lld/trunk/ELF/SyntheticSections.cpp @@ -2263,6 +2263,18 @@ return T->getTargetInputSection(); } +InputSection *InX::ARMAttributes; +BssSection *InX::Bss; +BssSection *InX::BssRelRo; +InputSection *InX::Common; +StringTableSection *InX::DynStrTab; +InputSection *InX::Interp; +GotPltSection *InX::GotPlt; +IgotPltSection *InX::IgotPlt; +MipsRldMapSection *InX::MipsRldMap; +StringTableSection *InX::ShStrTab; +StringTableSection *InX::StrTab; + template InputSection *elf::createCommonSection(); template InputSection *elf::createCommonSection(); template InputSection *elf::createCommonSection();