This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: weak references and --as-needed


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]