http://sourceware.org/bugzilla/show_bug.cgi?id=15478

--- Comment #1 from Cary Coutant <ccoutant at google dot com> 2013-05-16 
23:51:51 UTC ---
> situation (see attached tar.bz2 to reproduce):
> libmylib.so has unresolved symbols that are found in libmyplugin.so
> myapp.c++ calls into libmylib.so
> myapp.c++ is being compiled with -lmylib and -lmyplugin
>
> expected behaviour, and behaviour with gnu ld:
> myapp is linked against mylib and myplugin
>
> observed behaviour:
> myapp is only linked against mylib since it does not make direct calls into
> myplugin
> myapp is not executable (fails with message about myplugin symbols not being
> resolved in mylib)
>
> workaround:
> link with -no-as-needed
>
> Can you comment on this observed behaviour?  thanks

I think this is intended behavior for gold. It's expected that each
library will have its own dependencies recorded so that we only record
direct dependencies in the dynamic table. In your case, since
libmylib.so has references to libmyplugin.so, there should be a
DT_NEEDED entry in libmylib.so for libmyplugin.so. If you link
libmylib.so with -L. -lmyplugin, it should work.

-cary

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to