]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/mach/exc_catcher.c
xnu-1228.9.59.tar.gz
[apple/xnu.git] / libsyscall / mach / exc_catcher.c
index 507cb1000074aa469df27744f16b1f776a426206..a850865198bb172dfb42745789971c11c1e6f6aa 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 (
@@ -52,7 +52,7 @@ __private_extern__ kern_return_t internal_catch_exception_raise (
     static kern_return_t (*func)(mach_port_t, mach_port_t, mach_port_t, exception_type_t, exception_data_t, mach_msg_type_number_t);
     if (checkForFunction == 0) {
         checkForFunction = 1;
-        _dyld_lookup_and_bind("_catch_exception_raise", (unsigned long *)&func, (void **)0);
+               func = dlsym(RTLD_DEFAULT, "catch_exception_raise");
     }
     if (func == 0) {
         /* The user hasn't defined catch_exception_raise in their binary */