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

--- Comment #2 from Dave Cunningham <sparkprime at gmail dot com> 2013-05-17 
01:46:41 UTC ---
> 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.

Yes that mode of operation does work but is unfortunately not an option for us
as we would like to combine libmylib.so with a different API-compatible
libmyplugin.so in each of a whole range of myapp executables.  To resolve the
symbol in the libmylib.so build would mean building a number of libmylib.so
(one for each libmyplugin.so) and this would make our build take much more
time, as well as inflating the size of our releases.

It seems that it should be fairly easy for gold to broaden its 'as-needed'
criteria by scanning for unresolved symbols in the .so files (as well as in the
.o files) being linked.  That would seem to make the behaviour compatible with
the old behaviour of the old linker.

If that's not possible then -no-as-needed should be the default I think.

-- 
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