[lld] r258104 - Delete addIgnoredStrong.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 12:17:56 PST 2016
You want to rename IgnoredWeak -> Ignored since the counterpart has been
removed?
On Mon, Jan 18, 2016 at 4:05 PM, Rafael Espindola via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: rafael
> Date: Mon Jan 18 18:05:54 2016
> New Revision: 258104
>
> URL: http://llvm.org/viewvc/llvm-project?rev=258104&view=rev
> Log:
> Delete addIgnoredStrong.
>
> It is not needed now that we resolve symbols is shared libraries
> correctly.
>
> Modified:
> lld/trunk/ELF/Driver.cpp
> lld/trunk/ELF/SymbolTable.cpp
> lld/trunk/ELF/SymbolTable.h
> lld/trunk/ELF/Symbols.cpp
> lld/trunk/ELF/Symbols.h
> lld/trunk/ELF/Writer.cpp
>
> Modified: lld/trunk/ELF/Driver.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=258104&r1=258103&r2=258104&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Driver.cpp (original)
> +++ lld/trunk/ELF/Driver.cpp Mon Jan 18 18:05:54 2016
> @@ -308,7 +308,7 @@ template <class ELFT> void LinkerDriver:
> // 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.
>
> Modified: lld/trunk/ELF/SymbolTable.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=258104&r1=258103&r2=258104&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/SymbolTable.cpp (original)
> +++ lld/trunk/ELF/SymbolTable.cpp Mon Jan 18 18:05:54 2016
> @@ -123,13 +123,6 @@ SymbolBody *SymbolTable<ELFT>::addIgnore
> 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) {
>
> Modified: lld/trunk/ELF/SymbolTable.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=258104&r1=258103&r2=258104&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/SymbolTable.h (original)
> +++ lld/trunk/ELF/SymbolTable.h Mon Jan 18 18:05:54 2016
> @@ -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);
>
> Modified: lld/trunk/ELF/Symbols.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=258104&r1=258103&r2=258104&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Symbols.cpp (original)
> +++ lld/trunk/ELF/Symbols.cpp Mon Jan 18 18:05:54 2016
> @@ -124,8 +124,6 @@ template <class ELFT> static void doInit
> 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() {
>
> Modified: lld/trunk/ELF/Symbols.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=258104&r1=258103&r2=258104&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Symbols.h (original)
> +++ lld/trunk/ELF/Symbols.h Mon Jan 18 18:05:54 2016
> @@ -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>
>
> Modified: lld/trunk/ELF/Writer.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=258104&r1=258103&r2=258104&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Writer.cpp (original)
> +++ lld/trunk/ELF/Writer.cpp Mon Jan 18 18:05:54 2016
> @@ -613,8 +613,7 @@ template <class ELFT> static bool includ
>
> // 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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160119/9908f78c/attachment.html>
More information about the llvm-commits
mailing list