1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <mach-o/dyld_priv.h> #include <os/log.h> int dext_main(void) { os_log(OS_LOG_DEFAULT, "dyld-driverkit-basic"); return 24; } __attribute__((constructor)) void init(void) { _dyld_register_driverkit_main((void (*)())dext_main); }