[ELF] --wrap: don't unnecessarily expose __real_
authorFangrui Song <i@maskray.me>
Thu, 1 Oct 2020 03:09:25 +0000 (20:09 -0700)
committerFangrui Song <i@maskray.me>
Thu, 1 Oct 2020 03:09:25 +0000 (20:09 -0700)
commit4e9277eda1874ead60f2c9d7cdb558fd19b32076
tree50607e90205722411683dc796319cb4ad310ebf3
parent12bdd427b33a75bd7abb5d4cb095d0b983328034
[ELF] --wrap: don't unnecessarily expose __real_

The routing rules are:

sym -> __wrap_sym
__real_sym -> sym

__wrap_sym and sym are routing targets, so they need to be exposed to the symbol
table. __real_sym is not and can be eliminated if not used by regular object.
lld/ELF/Driver.cpp
lld/test/ELF/lto/wrap-1.ll