[llvm-dev] Need help on identifying a patch which fixed lld on linux platform
Dimitry Andric via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 13 03:47:13 PDT 2019
On 13 Jun 2019, at 08:59, karnajit wangkhem via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> This test is on a ubuntu 12 box. Can anyone please point me what revision/commit-id of lld fixed this issue which was atleast in llvm 5.0.
...
> Result:
> With llvm 5.0
>
> ./main
> Calling gn...
> ./main: symbol lookup error: shared/libsh.so: undefined symbol: fn <== symbol fn was not found in binary "main"
This was fixed in https://reviews.llvm.org/rLLD325849, after 6.0.0 was released:
------------------------------------------------------------------------
r325849 | ruiu | 2018-02-23 01:16:57 +0000 (Fri, 23 Feb 2018) | 16 lines
Make undefined symbol in DSO to pull out object files from archive files.
We have an internal program that does't link without this patch. I don't
know of any open-source program that needs this, but there might be.
Since this patch improves compatibility with GNU linkers with a few lines
of code, I think it's worth to be committed.
The problem is about undefined symbols in DSOs. Some programs depend on
the GNU linkers' behavior that they pull out object files from archive
files to resolve undefined symbols in DSOs. We already allow that kind of
"reverse" dependency (from DSOs to the main executable) for regular
symbols, in particular, for "__progname" symbol (which is usually in
crt0.o), but that doesn't work if the symbol is in an archive file.
This patch is to make it work.
Differential Revision: https://reviews.llvm.org/D43658
------------------------------------------------------------------------
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190613/a2a0e322/attachment.sig>
More information about the llvm-dev
mailing list