mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-02 22:51:28 +01:00
different addressing in the case of kc
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
32eba04396
commit
15b65bd95b
@ -23,7 +23,7 @@
|
||||
//#include "sse3_5_patcher.h"
|
||||
|
||||
#ifndef DEBUG_ALL
|
||||
#define KERNEL_DEBUG 0
|
||||
#define KERNEL_DEBUG 1
|
||||
#else
|
||||
#define KERNEL_DEBUG DEBUG_ALL
|
||||
#endif
|
||||
@ -200,11 +200,20 @@ UINTN LOADER_ENTRY::searchProcInDriver(UINT8 * driver, UINT32 driverLen, const c
|
||||
UINT32 symCmdOffset = Get_Symtab(driver);
|
||||
DBG("symCmdOffset=0x%X\n", symCmdOffset);
|
||||
if (symCmdOffset != 0) {
|
||||
symCmd = (struct symtab_command *)&driver[symCmdOffset];
|
||||
vArray = (struct nlist_64*)(&driver[symCmd->symoff]);
|
||||
lSizeVtable = symCmd->nsyms;
|
||||
Names = (const char*)(&driver[symCmd->stroff]);
|
||||
DBG("driver: AddrVtable=0x%x SizeVtable=0x%x NamesTable=0x%x\n", symCmd->symoff, lSizeVtable, symCmd->stroff);
|
||||
if ((((struct mach_header_64*)KernelData)->filetype) == MH_KERNEL_COLLECTION) {
|
||||
symCmd = (struct symtab_command *)&KernelData[symCmdOffset];
|
||||
vArray = (struct nlist_64*)(&KernelData[symCmd->symoff]);
|
||||
lSizeVtable = symCmd->nsyms;
|
||||
Names = (const char*)(&KernelData[symCmd->stroff]);
|
||||
DBG("driverKC: AddrVtable=0x%x SizeVtable=0x%x NamesTable=0x%x\n", symCmd->symoff, lSizeVtable, symCmd->stroff);
|
||||
|
||||
} else {
|
||||
symCmd = (struct symtab_command *)&driver[symCmdOffset];
|
||||
vArray = (struct nlist_64*)(&driver[symCmd->symoff]);
|
||||
lSizeVtable = symCmd->nsyms;
|
||||
Names = (const char*)(&driver[symCmd->stroff]);
|
||||
DBG("driver: AddrVtable=0x%x SizeVtable=0x%x NamesTable=0x%x\n", symCmd->symoff, lSizeVtable, symCmd->stroff);
|
||||
}
|
||||
}
|
||||
|
||||
if (!vArray || !lSizeVtable || !Names) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "DataHubCpu.h"
|
||||
|
||||
#ifndef DEBUG_ALL
|
||||
#define KEXT_INJECT_DEBUG 0
|
||||
#define KEXT_INJECT_DEBUG 1
|
||||
#else
|
||||
#define KEXT_INJECT_DEBUG DEBUG_ALL
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@ extern "C" {
|
||||
|
||||
|
||||
#ifndef DEBUG_ALL
|
||||
#define KEXT_DEBUG 0
|
||||
#define KEXT_DEBUG 1
|
||||
#else
|
||||
#define KEXT_DEBUG DEBUG_ALL
|
||||
#endif
|
||||
@ -1497,6 +1497,7 @@ VOID LOADER_ENTRY::PatchPrelinkedKexts()
|
||||
DBG("\n");
|
||||
|
||||
DictPtr = WholePlist;
|
||||
//new dict is the new kext
|
||||
while ((DictPtr = strstr(DictPtr, "dict>")) != NULL) {
|
||||
if (DictPtr[-1] == '<') {
|
||||
// opening dict
|
||||
|
Loading…
Reference in New Issue
Block a user