diff --git a/artiq/runtime/ksupport.c b/artiq/runtime/ksupport.c index 4bc8abec8..8236166d2 100644 --- a/artiq/runtime/ksupport.c +++ b/artiq/runtime/ksupport.c @@ -409,7 +409,7 @@ int main(void) } if(request->run_kernel) { - void (*kernel_run)() = request->library_info->init; + void (*kernel_run)() = dyld_lookup("__modinit__", request->library_info); void *typeinfo = dyld_lookup("typeinfo", request->library_info); mailbox_send_and_wait(&load_reply);