summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Driver.cpp2
-rw-r--r--lld/ELF/SymbolTable.cpp7
-rw-r--r--lld/ELF/SymbolTable.h1
-rw-r--r--lld/ELF/Symbols.cpp2
-rw-r--r--lld/ELF/Symbols.h5
-rw-r--r--lld/ELF/Writer.cpp3
6 files changed, 3 insertions, 17 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 343df0077db..f48b594e31f 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -308,7 +308,7 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
// On MIPS O32 ABI, _gp_disp is a magic symbol designates offset between
// start of function and gp pointer into GOT. Use 'strong' variant of
// the addIgnored to prevent '_gp_disp' substitution.
- Config->MipsGpDisp = Symtab.addIgnoredStrong("_gp_disp");
+ Config->MipsGpDisp = Symtab.addIgnored("_gp_disp");
// Define _gp for MIPS. st_value of _gp symbol will be updated by Writer
// so that it points to an absolute address which is relative to GOT.
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index 6735441787d..a68469887a0 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -123,13 +123,6 @@ SymbolBody *SymbolTable<ELFT>::addIgnored(StringRef Name) {
return addAbsolute(Name, ElfSym<ELFT>::IgnoredWeak);
}
-// The 'strong' variant of the addIgnored. Adds symbol which has a global
-// binding and cannot be substituted.
-template <class ELFT>
-SymbolBody *SymbolTable<ELFT>::addIgnoredStrong(StringRef Name) {
- return addAbsolute(Name, ElfSym<ELFT>::Ignored);
-}
-
// Rename SYM as __wrap_SYM. The original symbol is preserved as __real_SYM.
// Used to implement --wrap.
template <class ELFT> void SymbolTable<ELFT>::wrap(StringRef Name) {
diff --git a/lld/ELF/SymbolTable.h b/lld/ELF/SymbolTable.h
index 16ed821bf01..26cbe8ae219 100644
--- a/lld/ELF/SymbolTable.h
+++ b/lld/ELF/SymbolTable.h
@@ -55,7 +55,6 @@ public:
SymbolBody *addSynthetic(StringRef Name, OutputSectionBase<ELFT> &Section,
uintX_t Value);
SymbolBody *addIgnored(StringRef Name);
- SymbolBody *addIgnoredStrong(StringRef Name);
void scanShlibUndefined();
SymbolBody *find(StringRef Name);
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index dc043709291..40f8f0960da 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -124,8 +124,6 @@ template <class ELFT> static void doInitSymbols() {
ElfSym<ELFT>::End.setBinding(STB_GLOBAL);
ElfSym<ELFT>::IgnoredWeak.setBinding(STB_WEAK);
ElfSym<ELFT>::IgnoredWeak.setVisibility(STV_HIDDEN);
- ElfSym<ELFT>::Ignored.setBinding(STB_GLOBAL);
- ElfSym<ELFT>::Ignored.setVisibility(STV_HIDDEN);
}
void elf2::initSymbols() {
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 1976e50cbbe..28cdb28939c 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -306,10 +306,8 @@ template <class ELFT> struct ElfSym {
// Used to represent an undefined symbol which we don't want
// to add to the output file's symbol table. The `IgnoredWeak`
- // has weak binding and can be substituted. The `Ignore` has
- // global binding and gets priority over symbols from shared libs.
+ // has weak binding and can be substituted.
static Elf_Sym IgnoredWeak;
- static Elf_Sym Ignored;
// The content for _end and end symbols.
static Elf_Sym End;
@@ -324,7 +322,6 @@ template <class ELFT> struct ElfSym {
};
template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::IgnoredWeak;
-template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::Ignored;
template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::End;
template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::MipsGp;
template <class ELFT>
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index a7d80827a80..9a05fd2830f 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -613,8 +613,7 @@ template <class ELFT> static bool includeInSymtab(const SymbolBody &B) {
// Don't include synthetic symbols like __init_array_start in every output.
if (auto *U = dyn_cast<DefinedRegular<ELFT>>(&B))
- if (&U->Sym == &ElfSym<ELFT>::IgnoredWeak ||
- &U->Sym == &ElfSym<ELFT>::Ignored)
+ if (&U->Sym == &ElfSym<ELFT>::IgnoredWeak)
return false;
return true;
OpenPOWER on IntegriCloud