summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Symbols.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Symbols.h')
-rw-r--r--lld/ELF/Symbols.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 85e08670cde..fae0e0b2564 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -390,17 +390,16 @@ private:
// Some linker-generated symbols need to be created as
// DefinedRegular symbols.
template <class ELFT> struct ElfSym {
+ typedef std::pair<DefinedRegular<ELFT> *, DefinedRegular<ELFT> *> SymPair;
+
// The content for _etext and etext symbols.
- static DefinedRegular<ELFT> *Etext;
- static DefinedRegular<ELFT> *Etext2;
+ static SymPair Etext;
// The content for _edata and edata symbols.
- static DefinedRegular<ELFT> *Edata;
- static DefinedRegular<ELFT> *Edata2;
+ static SymPair Edata;
// The content for _end and end symbols.
- static DefinedRegular<ELFT> *End;
- static DefinedRegular<ELFT> *End2;
+ static SymPair End;
// The content for _gp symbol for MIPS target.
static SymbolBody *MipsGp;
@@ -414,12 +413,10 @@ template <class ELFT> struct ElfSym {
static SymbolBody *RelaIpltEnd;
};
-template <class ELFT> DefinedRegular<ELFT> *ElfSym<ELFT>::Etext;
-template <class ELFT> DefinedRegular<ELFT> *ElfSym<ELFT>::Etext2;
-template <class ELFT> DefinedRegular<ELFT> *ElfSym<ELFT>::Edata;
-template <class ELFT> DefinedRegular<ELFT> *ElfSym<ELFT>::Edata2;
-template <class ELFT> DefinedRegular<ELFT> *ElfSym<ELFT>::End;
-template <class ELFT> DefinedRegular<ELFT> *ElfSym<ELFT>::End2;
+template <class ELFT> typename ElfSym<ELFT>::SymPair ElfSym<ELFT>::Etext;
+template <class ELFT> typename ElfSym<ELFT>::SymPair ElfSym<ELFT>::Edata;
+template <class ELFT> typename ElfSym<ELFT>::SymPair ElfSym<ELFT>::End;
+
template <class ELFT> SymbolBody *ElfSym<ELFT>::MipsGp;
template <class ELFT> SymbolBody *ElfSym<ELFT>::MipsLocalGp;
template <class ELFT> SymbolBody *ElfSym<ELFT>::MipsGpDisp;
OpenPOWER on IntegriCloud