[lld] r317965 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 19:44:04 PST 2017
Nice. Thanks!
On Sat, Nov 11, 2017 at 10:59 AM, Rafael Espindola via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: rafael
> Date: Fri Nov 10 17:59:47 2017
> New Revision: 317965
>
> URL: http://llvm.org/viewvc/llvm-project?rev=317965&view=rev
> Log:
> Simplify. NFC.
>
> copyFrom doesn't copy the Binding, so this was a nop.
>
> Modified:
> lld/trunk/ELF/SymbolTable.cpp
> lld/trunk/ELF/SymbolTable.h
>
> Modified: lld/trunk/ELF/SymbolTable.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/
> SymbolTable.cpp?rev=317965&r1=317964&r2=317965&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/SymbolTable.cpp (original)
> +++ lld/trunk/ELF/SymbolTable.cpp Fri Nov 10 17:59:47 2017
> @@ -156,7 +156,7 @@ template <class ELFT> void SymbolTable::
> return;
> Symbol *Real = addUndefined<ELFT>(Saver.save("__real_" + Name));
> Symbol *Wrap = addUndefined<ELFT>(Saver.save("__wrap_" + Name));
> - WrappedSymbols.push_back({Sym, Real, Wrap, Sym->Binding,
> Real->Binding});
> + WrappedSymbols.push_back({Sym, Real, Wrap});
>
> // We want to tell LTO not to inline symbols to be overwritten
> // because LTO doesn't know the final symbol contents after renaming.
> @@ -192,9 +192,7 @@ void SymbolTable::applySymbolWrap() {
>
> // Replace __real_sym with sym and sym with __wrap_sym.
> W.Real->copyFrom(W.Sym);
> - W.Real->Binding = W.RealBinding;
> W.Sym->copyFrom(W.Wrap);
> - W.Sym->Binding = W.SymBinding;
>
> // We now have two copies of __wrap_sym. Drop one.
> W.Wrap->IsUsedInRegularObj = false;
>
> Modified: lld/trunk/ELF/SymbolTable.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/
> SymbolTable.h?rev=317965&r1=317964&r2=317965&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/SymbolTable.h (original)
> +++ lld/trunk/ELF/SymbolTable.h Fri Nov 10 17:59:47 2017
> @@ -127,8 +127,6 @@ private:
> Symbol *Sym;
> Symbol *Real;
> Symbol *Wrap;
> - uint8_t SymBinding;
> - uint8_t RealBinding;
> };
>
> // For -wrap.
>
>
> _______________________________________________
> 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/20171114/95a9dfd8/attachment.html>
More information about the llvm-commits
mailing list