Re: Debugging information/libc.so.4
From: Marcelo Magallon <firstname.lastname@example.org>
Hi, I'm having a little trouble with a program I'm working on, and I'd
like to use gdb to see what's going on, but when I try to include debug
information at compilation time I get:
$ gcc -o lentes -g Lentes.c graphics.c -lm
ld: Output file requires shared library `libc.so.4'
gcc: Internal compiler error: program ld got fatal signal 6
The compilation goes ok when I don't use the -g switch...
This seems to be a bug in the linux gcc implementation -- actually
somewhere in the linking/loading. If you need debugging, do the
gcc -c -g stuff.c
gcc -o lentes stuff.o ... -lm
You should also be sure that global names in your program don't collide
with standard library names -- mysterious results sometimes follow.
New Mexico Tech