1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/* * COPYRIGHT (c) 2011 Anthony Green <green@moxielogic.com> * */ typedef void (*pfunc) (void); extern pfunc __ctors[]; extern pfunc __ctors_end[]; void __main (void) { static int initialized; pfunc *p; if (initialized) return; initialized = 1; for (p = __ctors_end; p > __ctors; ) (*--p) (); }