]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/mach/exc_catcher_state.c
xnu-1228.15.4.tar.gz
[apple/xnu.git] / libsyscall / mach / exc_catcher_state.c
index c372d1c20be69c08703e5cd1a5376ae7c28e7300..efcb5344c51d1bcf38f012145b65ca9a4f1eed86 100644 (file)
@@ -35,7 +35,7 @@
 #include <mach/message.h>
 #include <mach/exception.h>
 #include <mach/mig_errors.h>
-#include <mach-o/dyld.h>
+#include <dlfcn.h>
 #include <stdlib.h>
 
 __private_extern__ kern_return_t internal_catch_exception_raise_state (
@@ -55,7 +55,7 @@ __private_extern__ kern_return_t internal_catch_exception_raise_state (
     static kern_return_t (*func)(mach_port_t, exception_type_t, exception_data_t, mach_msg_type_number_t, int *, thread_state_t, mach_msg_type_number_t, thread_state_t, mach_msg_type_number_t *);
     if (checkForFunction == 0) {
         checkForFunction = 1;
-        _dyld_lookup_and_bind("_catch_exception_raise_state", (unsigned long *)&func, (void **)0);
+               func = dlsym(RTLD_DEFAULT, "catch_exception_raise_state");
     }
     if (func == 0) {
         /* The user hasn't defined catch_exception_raise in their binary */