#include <lib/kprintf.h> int static_constructors(void) { kprintf("Calling static constructors\n"); extern void (* __ctor_list)(); void (** l_ctor)() = &__ctor_list; int l_ctorCount = *(int *)l_ctor; l_ctor++; while(l_ctorCount) { (*l_ctor)(); l_ctorCount--; l_ctor++; } }