$ cat x.c
extern int foo () __attribute__ ((weak));
int
main ()
{
if (foo)
foo ();
return 0;
}
$ gcc -static x.c
$ readelf -s a.out | grep foo
1257: 00000000 0 NOTYPE WEAK DEFAULT UND foo
Aren't undefined weak symbols supposed to be _defined_ to zero by
the linker, probably putting them in SHN_ANS ?
~velco
PS. This is binutils 2.14 20030612.