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