This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: RFH: libgcc_s.so being unnecessarily linked for mipsel-linux crosscompiler...
- From: Daniel Jacobowitz <drow at false dot org>
- To: gcc at gcc dot gnu dot org, binutils at sources dot redhat dot com
- Date: Thu, 28 Jul 2005 23:20:29 -0400
- Subject: Re: RFH: libgcc_s.so being unnecessarily linked for mipsel-linux crosscompiler...
- References: <60776.64.85.15.162.1122599245.squirrel@webmail4.pair.com> <42E996FD.1000208@avtrex.com>
On Thu, Jul 28, 2005 at 07:39:57PM -0700, David Daney wrote:
> It seems that the linker thinks that any shared object that references
> the magic _gp_disp symbol actually provides it. Since all mips objects
> reference _gp_disp, ld thinks that all shared objects are required to
> resolve all the other _gp_disp references. This causes all shared
> objects specified with --as-needed to be deemed needed and get a
> DT_NEEDED entry.
>
> The linker automagically resolves _gp_disp so this symbol should not
> cause a shared library to be needed.
>
> I hope that makes at least a little sense.
>
> I suspect that the problem is mips specific as _gp_disp handling is mips
> specific.
Yes, you're probably right. I thought this sounded familiar, but
couldn't find any references.
--
Daniel Jacobowitz
CodeSourcery, LLC