mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
kernel addresses are shifted
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
parent
0143e228ee
commit
c87aabd9fe
@ -2483,7 +2483,7 @@ LOADER_ENTRY::KernelAndKextPatcherInit()
|
||||
KernelData = NULL;
|
||||
return;
|
||||
}
|
||||
DBG( " kernel offset at 0x%x\n", KernelOffset);
|
||||
// DBG( " kernel offset at 0x%x\n", KernelOffset);
|
||||
// find __PRELINK_TEXT and __PRELINK_INFO
|
||||
Get_PreLink();
|
||||
//find symbol tables
|
||||
@ -2491,8 +2491,8 @@ LOADER_ENTRY::KernelAndKextPatcherInit()
|
||||
UINT32 symCmdOffset = 0;
|
||||
Get_Symtab(&KernelData[KernelOffset], &symCmdOffset);
|
||||
if (symCmdOffset != 0) {
|
||||
symCmd = (struct symtab_command *)&KernelData[symCmdOffset];
|
||||
AddrVtable = symCmd->symoff;
|
||||
symCmd = (struct symtab_command *)&KernelData[KernelOffset + symCmdOffset];
|
||||
AddrVtable = symCmd->symoff; //this offset relative to KernelData+0
|
||||
SizeVtable = symCmd->nsyms;
|
||||
NamesTable = symCmd->stroff;
|
||||
DBG("Kernel: AddrVtable=0x%x SizeVtable=0x%x NamesTable=0x%x\n", AddrVtable, SizeVtable, NamesTable);
|
||||
|
Loading…
Reference in New Issue
Block a user