[llvm-dev] Need help on identifying a patch which fixed lld on linux platform
karnajit wangkhem via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 13 04:29:24 PDT 2019
Thanks a lot for the pointer to this patch.
Regards,
Karan
On Thu, Jun 13, 2019, 4:17 PM Dimitry Andric <dimitry at andric.com> wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190613/b4eb8887/attachment.html>
More information about the llvm-dev
mailing list