weak references and --as-needed

Pierre Ossman ossman@cendio.se
Thu Apr 22 08:26:00 GMT 2010


On Wed, 21 Apr 2010 15:44:36 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> On Wednesday 21 April 2010 13:03:57 Pierre Ossman wrote:
> > On Wed, 21 Apr 2010 12:41:20 -0400 Mike Frysinger wrote:
> > > 
> > > note that libgcc_s isnt there only for exception handling.  it provides a
> > > lot of math functions as well.
> > 
> > Isn't that all in libgcc? That's what documentation and comments seem
> > to suggest.
> 
> the vast majority are in both.  look with `readelf -s`.  this is the reason 
> for libgcc_s.so linkage in the vast majority of apps in embedded systems 
> (arm/blackfin/mips/superh/etc...).
> 

I see. Not sure how useful this is as gcc tends to give the link line
-lgcc -lgcc_s. So the math routines tend to come from libgcc.a anyway.
An explicit --shared-libgcc gives ju -lgcc_s first though.

> i'm not saying this is related to your issue at hand, just a point of info 
> that libgcc_s !== exception handling.

Good to know. It doesn't seem to affect the issue here (probably
because the symbols are found in libgcc.a first), but it might have
some effects that I just haven't noticed yet.

Rgds
-- 
Pierre Ossman            OpenSource-based Thin Client Technology
System Developer         Telephone: +46-13-21 46 00
Cendio AB                Web: http://www.cendio.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100422/d16c7f93/attachment.sig>


More information about the Binutils mailing list