]> git.saurik.com Git - ldid.git/blobdiff - ldid.cpp
Add MH_DYLDLINK before attempting codesign_allocate.
[ldid.git] / ldid.cpp
index 02fbce5c921a70a95a5aa305e7613488adb98c64..334fd1f2098ddbaddcda59ef592d05fa28cce8a3 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -78,6 +78,8 @@ struct mach_header {
 #define MH_MAGIC 0xfeedface
 #define MH_CIGAM 0xcefaedfe
 
+#define MH_DYLDLINK   0x4
+
 #define MH_EXECUTE    0x2
 #define MH_DYLIB      0x6
 #define MH_BUNDLE     0x8
@@ -536,6 +538,8 @@ int main(int argc, const char *argv[]) {
             size_t size = _not(size_t);
             const char *arch; {
                 Framework framework(path);
+                framework->flags |= MH_DYLDLINK;
+
                 _foreach (load_command, framework.GetLoadCommands()) {
                     uint32_t cmd(framework.Swap((*load_command)->cmd));
                     if (cmd == LC_CODE_SIGNATURE) {