Loading...
cache_builder/CacheDylib.cpp dyld-1066.8 dyld-1042.1
--- dyld/dyld-1066.8/cache_builder/CacheDylib.cpp
+++ dyld/dyld-1042.1/cache_builder/CacheDylib.cpp
@@ -961,7 +961,7 @@
                 // Actually change the bindTarget to reflect the new type
                 bindTarget.kind = BindTarget::Kind::cacheImage;
                 bindTarget.inputImage.~InputImage();
-                bindTarget.cacheImage = (BindTarget::CacheImage) { VMOffset(targetCacheVMAddr - inputImage.targetDylib->cacheLoadAddress), inputImage.targetDylib, inputImage.isWeakDef };
+                bindTarget.cacheImage = (BindTarget::CacheImage) { VMOffset(targetCacheVMAddr - inputImage.targetDylib->cacheLoadAddress), inputImage.targetDylib, inputImage.isWeak };
                 break;
             }
             case BindTarget::Kind::cacheImage:
@@ -971,7 +971,6 @@
         }
 
         bindTarget.addend = addend;
-        bindTarget.isWeakImport = weakImport;
         this->bindTargets.push_back(std::move(bindTarget));
         dylibPatchInfo.bindTargetNames.push_back(std::move(bindTargetAndName.second));
     };
@@ -1057,14 +1056,14 @@
             auto gotIt = coalescedGOTs.find(fixupVMAddr);
             if ( gotIt != coalescedGOTs.end() ) {
                 // Probably a missing weak import.  Rewrite the original GOT anyway, but also the coalesced one
-                dyld_cache_patchable_location patchLoc(gotIt->second, pmd, addend, bindTarget.isWeakImport);
+                dyld_cache_patchable_location patchLoc(gotIt->second, pmd, addend);
                 auto& gotUses = dylibPatchInfo.bindGOTUses[bindOrdinal];
                 gotUses.emplace_back((PatchInfo::GOTInfo){ patchLoc, VMOffset(targetValue) });
             } else {
                 auto authgotIt = coalescedAuthGOTs.find(fixupVMAddr);
                 if ( authgotIt != coalescedAuthGOTs.end() ) {
                     // Probably a missing weak import.  Rewrite the original GOT anyway, but also the coalesced one
-                    dyld_cache_patchable_location patchLoc(authgotIt->second, pmd, addend, bindTarget.isWeakImport);
+                    dyld_cache_patchable_location patchLoc(authgotIt->second, pmd, addend);
                     auto &gotUses = dylibPatchInfo.bindAuthGOTUses[bindOrdinal];
                     gotUses.emplace_back((PatchInfo::GOTInfo){ patchLoc, VMOffset(targetValue) });
                 }
@@ -1133,7 +1132,7 @@
 
                 auto gotIt = coalescedGOTs.find(fixupVMAddr);
                 if ( gotIt != coalescedGOTs.end() ) {
-                    dyld_cache_patchable_location patchLoc(gotIt->second, patchTablePMD, patchTableAddend, bindTarget.isWeakImport);
+                    dyld_cache_patchable_location patchLoc(gotIt->second, patchTablePMD, patchTableAddend);
                     auto& gotUses = dylibPatchInfo.bindGOTUses[bindOrdinal];
                     gotUses.emplace_back((PatchInfo::GOTInfo){ patchLoc, finalVMOffset });
 
@@ -1149,7 +1148,7 @@
                 } else {
                     auto authgotIt = coalescedAuthGOTs.find(fixupVMAddr);
                     if ( authgotIt != coalescedAuthGOTs.end() ) {
-                        dyld_cache_patchable_location patchLoc(authgotIt->second, patchTablePMD, patchTableAddend, bindTarget.isWeakImport);
+                        dyld_cache_patchable_location patchLoc(authgotIt->second, patchTablePMD, patchTableAddend);
                         auto& gotUses = dylibPatchInfo.bindAuthGOTUses[bindOrdinal];
                         gotUses.emplace_back((PatchInfo::GOTInfo){ patchLoc, finalVMOffset });
 
@@ -1164,7 +1163,7 @@
                         this->segments[segIndex].tracker.remove(fixupLoc);
                     } else {
                         // Location wasn't coalesced.  So add to the regular list of uses
-                        dylibPatchInfo.bindUses[bindOrdinal].emplace_back(fixupVMAddr, patchTablePMD, patchTableAddend, bindTarget.isWeakImport);
+                        dylibPatchInfo.bindUses[bindOrdinal].emplace_back(fixupVMAddr, patchTablePMD, patchTableAddend);
                     }
                 }
             }