1 extern int foo; 2 3 static void 4 __attribute__ ((unused, constructor)) 5 set_foo (void) 6 { 7 foo = 30; 8 } 9