weak references and --as-needed
Alan Modra
amodra@gmail.com
Wed Apr 21 04:37:00 GMT 2010
On Tue, Apr 20, 2010 at 02:02:44PM +0200, Pierre Ossman wrote:
[snip]
> End result is that you have programs depending on libgcc_s even though
> they do not use exception handling, complicating the deployment to
> non-glibc systems.
[snip]
Why is this a problem? If libgcc_s is needed by your library then what
difference does it make if libgcc_s is also marked as needed by the
main executable?
> Now this is now well behaved for this scenario, but is there some other
> scenario that will break because of this?
Probably. I'm loathe to change this without a really good reason.
> The documentation doesn't
> mention how --as-needed and weak symbols interact, so it's currently
> somewhat undefined.
Worse than that, the ELF standard doesn't properly define the
behaviour of weak symbols.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list