This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: weak references and --as-needed
- From: Alan Modra <amodra at gmail dot com>
- To: Pierre Ossman <ossman at cendio dot se>
- Cc: binutils at sourceware dot org
- Date: Wed, 21 Apr 2010 14:07:40 +0930
- Subject: Re: weak references and --as-needed
- References: <20100420140244.34a4a0f5@ossman.lkpg.cendio.se>
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