forked from OSchip/llvm-project
Delete addIgnoredStrong.
It is not needed now that we resolve symbols is shared libraries correctly. llvm-svn: 258104
This commit is contained in:
parent
510498c0d3
commit
3a6a0a0109
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue