[ELF] --wrap: don't error `undefined reference to __real_foo` (--no-allow-shlib-undef...
authorFangrui Song <maskray@google.com>
Tue, 2 Jun 2020 05:57:43 +0000 (22:57 -0700)
committerFangrui Song <maskray@google.com>
Tue, 2 Jun 2020 06:00:51 +0000 (23:00 -0700)
commita6ae333a0c23fc9b0783ca45e2676abac00c6723
treedbd463876daf8eddebce08f92a0ac8a357e553b8
parent07239c736a5b664942551b82ffa660f2a3f14f41
[ELF] --wrap: don't error `undefined reference to __real_foo` (--no-allow-shlib-undefined) if foo is a wrapped definition

This is a regression after D51283.

Also, export `foo` if `__real_foo` is referenced by a shared object.
lld/ELF/SymbolTable.cpp
lld/test/ELF/wrap-dynamic-undef.s
lld/test/ELF/wrap-no-real.s
lld/test/ELF/wrap-shlib-undefined.s [new file with mode: 0644]