Loading...
cache-builder/kernel_collection_builder.cpp dyld-1231.3 dyld-1160.6
--- dyld/dyld-1231.3/cache-builder/kernel_collection_builder.cpp
+++ dyld/dyld-1160.6/cache-builder/kernel_collection_builder.cpp
@@ -500,43 +500,6 @@
             return false;
     }
 
-    // Make sure we have an xnu binary, from this collection or an existing one
-    __block const dyld3::MachOAnalyzer* kernelMA = nullptr;
-    if ( builder->options.collectionKind == baseKC ) {
-        for (const AppCacheBuilder::InputDylib& input : builder->inputFiles) {
-            const dyld3::MachOAnalyzer* ma = (const dyld3::MachOAnalyzer*)input.dylib.loadedFileInfo.fileContent;
-
-            // Skip codeless kexts
-            if ( ma == nullptr )
-                continue;
-
-            if ( ma->isStaticExecutable() ) {
-                kernelMA = ma;
-            }
-        }
-        if ( !kernelMA ) {
-            builder->error("Cannot build bootKC without xnu binary");
-            return false;
-        }
-    } else {
-        // auxKC/pageableKC
-        Diagnostics diag;
-
-        const dyld3::MachOAppCache* kernelCacheMA = (const dyld3::MachOAppCache*)builder->kernelCollectionFileInfo.fileContent;
-        kernelCacheMA->forEachDylib(diag, ^(const dyld3::MachOAnalyzer *ma, const char *name, bool &stop) {
-            if ( ma->isStaticExecutable() ) {
-                kernelMA = ma;
-                stop = true;
-            }
-        });
-
-        if ( !kernelMA ) {
-            builder->error("Cannot build pageableKC/auxKC without xnu binary from bootKC");
-            return false;
-        }
-    }
-
-
     dispatch_apply(builder->inputFiles.size(), DISPATCH_APPLY_AUTO, ^(size_t index) {
         const AppCacheBuilder::InputDylib& input = builder->inputFiles[index];
         auto errorHandler = ^(const char* msg) {
@@ -548,9 +511,7 @@
             return;
         if (!ma->canBePlacedInKernelCollection(input.dylib.loadedFileInfo.path, errorHandler)) {
             assert(input.errors->hasError());
-            return;
-        }
-
+        }
     });
     for (const AppCacheBuilder::InputDylib& input : builder->inputFiles) {
         if ( input.errors->hasError() ) {