Misleading linker message
H . J . Lu
hjl@lucon.org
Fri Nov 16 04:41:00 GMT 2001
More information about the Binutils mailing list
Fri Nov 16 04:41:00 GMT 2001
- Previous message (by thread): [ Missing Directory in CVS tree]
- Next message (by thread): Misleading linker message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
# cat foo.c
extern void bar ();
void (*func) () = bar;
_start ()
{
}
# gcc -g foo.c -c
# ld -o static foo.o
foo.o: In function `_start':
/home/hjl/bugs/gas/discard3/foo.c:6: undefined reference to `bar'
The line number is totally wrong. In the case of the Linux kernel, ld
reports the undefined reference in a totally unrelated source file.
# gcc foo.c -c
# ld -o static foo.o
foo.o(.data+0x0): undefined reference to `bar'
This one is more useful.
H.J.
- Previous message (by thread): [ Missing Directory in CVS tree]
- Next message (by thread): Misleading linker message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list