mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-03-12 13:19:38 +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
rEFIt_UEFI/Platform
@ -23,7 +23,7 @@
|
|||||||
//#include "sse3_5_patcher.h"
|
//#include "sse3_5_patcher.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define KERNEL_DEBUG 0
|
#define KERNEL_DEBUG 1
|
||||||
#else
|
#else
|
||||||
#define KERNEL_DEBUG DEBUG_ALL
|
#define KERNEL_DEBUG DEBUG_ALL
|
||||||
#endif
|
#endif
|
||||||
@ -200,11 +200,20 @@ UINTN LOADER_ENTRY::searchProcInDriver(UINT8 * driver, UINT32 driverLen, const c
|
|||||||
UINT32 symCmdOffset = Get_Symtab(driver);
|
UINT32 symCmdOffset = Get_Symtab(driver);
|
||||||
DBG("symCmdOffset=0x%X\n", symCmdOffset);
|
DBG("symCmdOffset=0x%X\n", symCmdOffset);
|
||||||
if (symCmdOffset != 0) {
|
if (symCmdOffset != 0) {
|
||||||
symCmd = (struct symtab_command *)&driver[symCmdOffset];
|
if ((((struct mach_header_64*)KernelData)->filetype) == MH_KERNEL_COLLECTION) {
|
||||||
vArray = (struct nlist_64*)(&driver[symCmd->symoff]);
|
symCmd = (struct symtab_command *)&KernelData[symCmdOffset];
|
||||||
lSizeVtable = symCmd->nsyms;
|
vArray = (struct nlist_64*)(&KernelData[symCmd->symoff]);
|
||||||
Names = (const char*)(&driver[symCmd->stroff]);
|
lSizeVtable = symCmd->nsyms;
|
||||||
DBG("driver: AddrVtable=0x%x SizeVtable=0x%x NamesTable=0x%x\n", symCmd->symoff, lSizeVtable, symCmd->stroff);
|
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) {
|
if (!vArray || !lSizeVtable || !Names) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "DataHubCpu.h"
|
#include "DataHubCpu.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define KEXT_INJECT_DEBUG 0
|
#define KEXT_INJECT_DEBUG 1
|
||||||
#else
|
#else
|
||||||
#define KEXT_INJECT_DEBUG DEBUG_ALL
|
#define KEXT_INJECT_DEBUG DEBUG_ALL
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,7 +22,7 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define KEXT_DEBUG 0
|
#define KEXT_DEBUG 1
|
||||||
#else
|
#else
|
||||||
#define KEXT_DEBUG DEBUG_ALL
|
#define KEXT_DEBUG DEBUG_ALL
|
||||||
#endif
|
#endif
|
||||||
@ -1497,6 +1497,7 @@ VOID LOADER_ENTRY::PatchPrelinkedKexts()
|
|||||||
DBG("\n");
|
DBG("\n");
|
||||||
|
|
||||||
DictPtr = WholePlist;
|
DictPtr = WholePlist;
|
||||||
|
//new dict is the new kext
|
||||||
while ((DictPtr = strstr(DictPtr, "dict>")) != NULL) {
|
while ((DictPtr = strstr(DictPtr, "dict>")) != NULL) {
|
||||||
if (DictPtr[-1] == '<') {
|
if (DictPtr[-1] == '<') {
|
||||||
// opening dict
|
// opening dict
|
||||||
|
Loading…
Reference in New Issue
Block a user