A use-case we have is to be able to supply a __wrap_foo function and a --wrap=foo command line argument to the linker but for these to only have an effect if foo is included in the link. If foo is not included in the link then a reference to __real_foo should be considered a weak reference.
This was the behaviour previous to https://github.com/llvm/llvm-project/commit/8b01b638d0145473d27a0dd99ded48cc5a8b85a1.
Restore this behaviour.
# RUN: rm -rf %t && split-file %s %t && cd %t so that you can omit %t/ below