]> git.saurik.com Git - apple/dyld.git/commitdiff
dyld-750.6.tar.gz macos-10156 v750.6
authorApple <opensource@apple.com>
Wed, 29 Jul 2020 21:15:23 +0000 (21:15 +0000)
committerApple <opensource@apple.com>
Wed, 29 Jul 2020 21:15:23 +0000 (21:15 +0000)
src/dyld2.cpp

index 18aec931c680e52d1f0fd094ca9f0df2cdd56cd0..68585b21b1de5361a0c1940fe842f250c1c0214f 100644 (file)
@@ -1474,7 +1474,7 @@ void removeImage(ImageLoader* image)
        }
 
        // If this image is the potential canonical definition of any weak defs, then set them to a tombstone value
-       if ( gLinkContext.weakDefMapInitialized && image->hasCoalescedExports() ) {
+       if ( gLinkContext.weakDefMapInitialized && image->hasCoalescedExports() && (image->getState() >= dyld_image_state_bound) ) {
                Diagnostics diag;
                const dyld3::MachOAnalyzer* ma = (const dyld3::MachOAnalyzer*)image->machHeader();
                ma->forEachWeakDef(diag, ^(const char *symbolName, uintptr_t imageOffset, bool isFromExportTrie) {