libgcc_s.so is unnecessarily linked for MIPS
Kishore K
hellokishore at gmail.com
Tue Jun 13 12:16:15 UTC 2006
Hi all
The libgcc_s.so library is getting linked unnecessarily even for helloworld
program, when I use the tool chain built from buildroot based on gcc 3.4.4,
binutils 2.16.1 and uClibc - 0.9.28.
Here is my program and the output of mips-linux-readelf.
Helloworld.c
#include <stdio.h>
main(void)
{
printf("hello world\n");
return 0;
}
[kishorek at localhost tmp]$ mips-linux-gcc -o helloworld helloworld.c
[kishorek at localhost tmp]$ mips-linux-readelf -d helloworld
Dynamic section at offset 0x120 contains 26 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.6]
AFAIK, none of the symbols of libgcc_s.so are required to be included in the
above program. Then may I know, why is it dependent on libgcc_s.so.
Same problem is observed with gcc-4.0.3 and various versions of binutils (
2.15.94.0.2, 2.15.97, 2.16.91.0.7 & 2.17.50.0.2). I am using the latest
buildroot snapshot. The same problem is observed even with old
uclibc-0.9.27based snapshots, when used for compiling tool chain based
on
gcc-3.4.4 and binutils 2.16.* and 2.15.*
Any pointers to solve the above problem would be appreciated.
TIA,
--kishore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20060613/77529f6e/attachment.htm
More information about the uClibc
mailing list