[PATCH] D135737: [LLD][ELF] restore behaviour of __real_foo being a weak reference to a lazy foo
ben via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 13 10:51:39 PDT 2022
bd1976llvm added inline comments.
================
Comment at: lld/test/ELF/wrap-extract-unreferenced-orig.s:1
+# REQUIRES: x86
+## Show that lld pulls in a definition of foo from an archive
----------------
MaskRay wrote:
> The change does not affect the behavior of this test. What does this test check?
This is testing that lld pulls in a definition of `foo` from an archive even if there are no references to `foo` after wrapping (there is no use of `__real_foo`). With that behaviour it doesn't matter that `__real_foo` is patched to zero if `foo` is not extracted from an archive (it's still lazy) because `__wrap_foo` must be unused. Obviously, this isn't that useful if `__real_foo` can be used outside of `__wrap_foo` though....
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135737/new/
https://reviews.llvm.org/D135737
More information about the llvm-commits
mailing list