bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/15478] -no-as-needed required to avoid runtime symbol lookup e


From: sparkprime at gmail dot com
Subject: [Bug gold/15478] -no-as-needed required to avoid runtime symbol lookup error
Date: Fri, 17 May 2013 01:46:41 +0000

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]