1 #include <stdio.h> 2 3 int x; 4 5 __attribute__((weak)) foobar(void)6 void foobar (void) { x++; } 7 main(void)8 int main (void) 9 { 10 foobar (); 11 if (x == -1) 12 printf ("OK\n"); 13 return 0; 14 } 15