This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How do I prevent gcc from linking with GNU standard C library
- From: Tanveer Ahmad <tahmad at intertrust dot com>
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Fri, 26 Apr 2002 16:47:02 -0700
- Subject: How do I prevent gcc from linking with GNU standard C library
Hi,
I want to link my program with a third party standard C library, instead of
the GNU standard C library. I used the "-nostdlib" option in gcc, however I
get the following warning during linking:
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to
080488d0
and, when I run "ldd" on the this binary, I still see that it requires
libc.so.6
Here's my gcc command line :
gcc -D__STDC_VERSION__=199901L -g -c t1.c -I /test/include
gcc -D__STDC_VERSION__=199901L -fhonor-std -fno-builtin -o a.out t1.o
-lpthread -lgcc -nostdlib -nodefaultlibs /test/lib/sxlgcc2.a
Please advice.
thanks,
--Tanveer.