This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Link error
- From: Andrew Haley <aph at redhat dot com>
- To: "Vardhan, Sundara (GE Infra, Energy)" <sundara dot vardhan at ge dot com>
- Cc: Rob Sherry <rsherry at ahfc dot state dot ak dot us>, gcc-help at gcc dot gnu dot org
- Date: Mon, 28 Jul 2008 13:28:06 +0100
- Subject: Re: Link error
- References: <8E460D1B58F94945A20AA70D4D41430D052DEACB@ALPMLVEM08.e2k.ad.ge.com>
Vardhan, Sundara (GE Infra, Energy) wrote:
> Hi Andrew
Hi. Could I please ask you to stop stop-posting? It's
getting very confusing.
> I checked libc.a using nm and .__memmove is defined. The following is the compile/load line where it fails
>
> gcc -W1,-soname=x.so -o x.so .*I6.o -shared -Wall -D__USE_GNU -D_GNU_SOURCE -DDEBUG -DLEAVE_OUT_REV_ID -O2 -D_ALL_SOURCE -Drs6000 -D__EXTENSIONS__ -I/usr/openwin/include -DAIX53 -U__MATH__ -DAIX -DRS6000 -fPIC -L<libpath> -lsbI6 -L<libpath> -ldbI6
> /lib/libc.a(moveeq.o):moveeq.s:(.pr+0xc): undefined reference to `.___memmove'
>
Ouch. You're linking statically against libc. I don't know what's
causing this, but I suspect it's a Bad Thing.
Andrew.