[PATCH] D135897: [LLD][ELF] --wrap: __real_foo references should trigger archive extraction for foo

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 11:01:01 PDT 2022


bd1976llvm created this revision.
bd1976llvm added reviewers: MaskRay, smeenai, llvm-commits.
Herald added subscribers: StephenFan, arichardson, emaste.
Herald added a project: All.
bd1976llvm requested review of this revision.

A reference to `__real_foo` should trigger archive extraction of the input file that defines `foo`, otherwise a link using --wrap=foo might fail to link with an undefined reference to `foo`.
This matches bfd linker behaviour.

Replaces https://reviews.llvm.org/D135737.


https://reviews.llvm.org/D135897

Files:
  lld/ELF/Driver.cpp
  lld/test/ELF/wrap-extract-real.ll
  lld/test/ELF/wrap-extract-real.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135897.467538.patch
Type: text/x-patch
Size: 6023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221013/bdb80d47/attachment.bin>


More information about the llvm-commits mailing list