Loading...
dyld3/ClosureFileSystemNull.cpp dyld-732.8 dyld-832.7.3
--- dyld/dyld-732.8/dyld3/ClosureFileSystemNull.cpp
+++ dyld/dyld-832.7.3/dyld3/ClosureFileSystemNull.cpp
@@ -34,9 +34,14 @@
 }
 
 void FileSystemNull::unloadFile(const LoadedFileInfo& info) const {
+    if (info.unload)
+        info.unload(info);
 }
 
 void FileSystemNull::unloadPartialFile(LoadedFileInfo& info, uint64_t keepStartOffset, uint64_t keepLength) const {
+    // Note we don't actually unload the data here, but we do want to update the offsets for other data structures to track where we are
+    info.fileContent = (const void*)((char*)info.fileContent + keepStartOffset);
+    info.fileContentLen = keepLength;
 }
 
 bool FileSystemNull::fileExists(const char* path, uint64_t* inode, uint64_t* mtime,