Skip to content

Instantly share code, notes, and snippets.

@indragiek
Forked from lightbulbone/dsc_extractor.patch
Created November 2, 2020 21:29
Show Gist options
  • Save indragiek/2c00ae2e2c624e380e036966d7362c02 to your computer and use it in GitHub Desktop.
Save indragiek/2c00ae2e2c624e380e036966d7362c02 to your computer and use it in GitHub Desktop.
Patch for Apple's dsc_extractor in the dyld package.
--- dyld-210.2.3/launch-cache/dsc_extractor.cpp 2012-05-21 02:35:15.000000000 -0400
+++ dyld-210.2.3/launch-cache/dsc_extractor.cpp 2013-07-26 16:05:03.000000000 -0400
@@ -37,6 +37,7 @@
#include <mach-o/arch.h>
#include <mach-o/loader.h>
#include <Availability.h>
+#include <dlfcn.h>
#define NO_ULEB
#include "Architectures.hpp"
@@ -456,7 +457,7 @@
}
-#if 0
+/* #if 0 */
typedef int (*extractor_proc)(const char* shared_cache_file_path, const char* extraction_root_path,
void (^progress)(unsigned current, unsigned total));
@@ -468,7 +469,7 @@
return 1;
}
- void* handle = dlopen("/Developer/Platforms/iPhoneOS.platform/usr/lib/dsc_extractor.bundle", RTLD_LAZY);
+ void* handle = dlopen("/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/lib/dsc_extractor.bundle", RTLD_LAZY);
if ( handle == NULL ) {
fprintf(stderr, "dsc_extractor.bundle could not be loaded\n");
return 1;
@@ -484,7 +485,7 @@
fprintf(stderr, "dyld_shared_cache_extract_dylibs_progress() => %d\n", result);
return 0;
}
-#endif
+/* #endif */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment