From 1a3fc9cdeb7d275ad01bd273e15e2e3f2720ba35 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 29 May 2016 08:29:51 -0700 Subject: [PATCH] Module: Avoid writing missing stubs on reimport. In case they were manually linked, or something. --- Core/HLE/sceKernelModule.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index d8175d96cf..bfa8a27ed6 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -709,13 +709,16 @@ void ImportFuncSymbol(const FuncSymbolImport &func, bool reimporting) { } // It hasn't been exported yet, but hopefully it will later. - if (GetModuleIndex(func.moduleName) != -1) { + bool isKnownModule = GetModuleIndex(func.moduleName) != -1; + if (isKnownModule) { WARN_LOG_REPORT(LOADER, "Unknown syscall in known module: %s 0x%08x", func.moduleName, func.nid); } else { INFO_LOG(LOADER, "Function (%s,%08x) unresolved, storing for later resolving", func.moduleName, func.nid); } - WriteFuncMissingStub(func.stubAddr, func.nid); - currentMIPS->InvalidateICache(func.stubAddr, 8); + if (isKnownModule || !reimporting) { + WriteFuncMissingStub(func.stubAddr, func.nid); + currentMIPS->InvalidateICache(func.stubAddr, 8); + } } void ExportFuncSymbol(const FuncSymbolExport &func) {