RFH: libgcc_s.so being unnecessarily linked for mipsel-linux cross compiler...
David Daney
ddaney@avtrex.com
Thu Jul 28 20:54:00 GMT 2005
H. J. Lu wrote:
> On Thu, Jul 28, 2005 at 12:48:31PM -0700, David Daney wrote:
>
>>I am not sure if this is a GCC problem or a binutils problem.
>>
>>I have a a mipsel-linux cross compiler (gcc-3.4.3/binutils-2.16.1) and
>>whenever I compile even the simplest hello-world.c libgcc_s.so is linked.
>>
>>When I do the same thing natively on my i686/FC3, libgcc_s.so is not linked.
>>
>>If if explicitly pass -static-libgcc to the cross compiler I do not need
>>libgcc_s.so (as would be expected).
>>
>>As you can see from the transcript below libgcc_s is being linked with
>>--as-needed.
>>
>>Also you can see that neither hello-world.o nor my libc-2.3.3.so have
>>any undefined symbols that would be satisfied by libgcc_s.so.
>>
>>Any ideas about what is going on here?
>>
>
>
> Does your glibc need libgcc_s.so? Can you try the current binutils?
>
I don't think so:
[daney@dl2 junk]$ readelf -d /usr/local/mipsel-linux-3.4.3/lib/libc-2.3.3.so
Dynamic section at offset 0x14c contains 28 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [ld.so.1]
0x0000000e (SONAME) Library soname: [libc.so.6]
0x0000000c (INIT) 0x15790
[daney@dl2 junk]$ readelf -d /usr/local/mipsel-linux-3.4.3/lib/ld-2.3.3.so
Dynamic section at offset 0xec contains 22 entries:
Tag Type Name/Value
0x0000000e (SONAME) Library soname: [ld.so.1]
0x00000004 (HASH) 0x1c4
As far as I can tell none of the undefined symbols in libc.so.6 are
satisfied by libgcc_s.so.
Do you know of a patch to binutils since 2.16.1 that would fix the problem?
David Daney
More information about the Binutils
mailing list