Loading...
src/dyldAPIs.cpp dyld-46.16 dyld-46.9
--- dyld/dyld-46.16/src/dyldAPIs.cpp
+++ dyld/dyld-46.9/src/dyldAPIs.cpp
@@ -1481,10 +1481,7 @@
 		if ( dyld::getImageCount() != 1 )
 			throw "_dyld_update_prebinding cannot be called with dylib already loaded";
 			
-		// note that we are prebinding
-		dyld::gLinkContext.prebinding = true;
-
-		const uint32_t max_allowed_link_errors = 100;
+		const uint32_t max_allowed_link_errors = 10;
 		uint32_t link_error_count = 0;
 		
 		// load and link each dylib
@@ -1516,12 +1513,10 @@
 						stage = "link";
 					fprintf(stderr, "update_prebinding: warning: could not %s %s: %s\n", stage, paths[i], msg);
 				}
-				if ( (image != NULL) && image->isPrebindable() ) // don't count top level dylib being unprebound as an error
+				if ( image != NULL )
 					link_error_count++;
-				if ( link_error_count > max_allowed_link_errors ) {
-					fprintf(stderr, "update_prebinding: too many errors (%d) \n", link_error_count);
-					throw "terminating";
-				}
+				if ( link_error_count > max_allowed_link_errors )
+					throw;
 			}
 		}