diff --git a/Library/OcAppleKernelLib/PrelinkedContext.c b/Library/OcAppleKernelLib/PrelinkedContext.c index 89208c78..344e207e 100644 --- a/Library/OcAppleKernelLib/PrelinkedContext.c +++ b/Library/OcAppleKernelLib/PrelinkedContext.c @@ -108,12 +108,14 @@ PrelinkedFindKmodAddress ( return 0; } - SymbolName = MachoGetSymbolName64 (ExecutableContext, Symbol); - if (SymbolName && AsciiStrCmp (SymbolName, "_kmod_info") == 0) { - if (!MachoIsSymbolValueInRange64 (ExecutableContext, Symbol)) { - return 0; + if ((Symbol->Type & MACH_N_TYPE_STAB) == 0) { + SymbolName = MachoGetSymbolName64 (ExecutableContext, Symbol); + if (SymbolName && AsciiStrCmp (SymbolName, "_kmod_info") == 0) { + if (!MachoIsSymbolValueInRange64 (ExecutableContext, Symbol)) { + return 0; + } + break; } - break; } Index++;