OSDN Git Service

[ELF] --wrap: Drop __real_ symbol from the symbol table
authorRui Ueyama <ruiu@google.com>
Wed, 27 May 2020 23:18:55 +0000 (16:18 -0700)
committerFangrui Song <maskray@google.com>
Wed, 27 May 2020 23:58:00 +0000 (16:58 -0700)
commit54d289685260da85fc43c59db2550b18df7c33a5
tree0a5778c9e0cea1f3b0258db8ddcb677df556c580
parent2bf3fe9b6dedf727990e68244a3d637518ea8bc3
[ELF] --wrap: Drop __real_ symbol from the symbol table

In D34993, we discussed and concluded that we should drop `__real_
symbol from the symbol table, but I did the opposite in D50569.
This patch is to drop `__real_` symbol.

MaskRay's note: omitting `__real_` is important if it is undefined:
otherwise a subsequent link may error due to the undefined `__real_` in .dynsym

Differential Revision: https://reviews.llvm.org/D51283
lld/ELF/SymbolTable.cpp
lld/test/ELF/lto/wrap-2.ll
lld/test/ELF/wrap-no-real.s
lld/test/ELF/wrap.s