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