mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
- Fix binary search algorithm in LdrGetProcedureAddress
- Fix temporary ntdll export hack (r24395) svn path=/trunk/; revision=24397
This commit is contained in:
@@ -38,7 +38,7 @@ KiUserApcDispatcher@16
|
||||
KiUserCallbackDispatcher@12
|
||||
KiUserExceptionDispatcher@8
|
||||
KiIntSystemCall@0
|
||||
KeFastSystemCallRet@0 ; big hack since LdrGetProcedureAddress is broken
|
||||
KiFastSystemCallRet@0
|
||||
KiFastSystemCall@0
|
||||
LdrAccessResource@16
|
||||
LdrAddRefDll@8
|
||||
|
||||
@@ -257,9 +257,9 @@ _KiFastSystemCall@0:
|
||||
sysenter
|
||||
.endfunc
|
||||
|
||||
.func KeFastSystemCallRet@0
|
||||
.globl _KeFastSystemCallRet@0
|
||||
_KeFastSystemCallRet@0:
|
||||
.func KiFastSystemCallRet@0
|
||||
.globl _KiFastSystemCallRet@0
|
||||
_KiFastSystemCallRet@0:
|
||||
|
||||
/* Just return to caller */
|
||||
ret
|
||||
|
||||
@@ -69,22 +69,15 @@ LdrGetProcedureAddress (IN PVOID BaseAddress,
|
||||
{
|
||||
mid = (minn + maxn) / 2;
|
||||
CurrentNamePtr = (PCHAR)RVA(BaseAddress, NamePtr[mid]);
|
||||
res = strncmp(CurrentNamePtr, Name->Buffer, Name->Length);
|
||||
res = strcmp(CurrentNamePtr, Name->Buffer);
|
||||
if (res == 0)
|
||||
{
|
||||
/*
|
||||
* Check if the beginning of the name matched, but it's still
|
||||
* not the whole name.
|
||||
*/
|
||||
if (CurrentNamePtr[Name->Length] != 0)
|
||||
{
|
||||
res = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ProcedureAddress = (PVOID)RVA(BaseAddress, AddressPtr[OrdinalPtr[mid]]);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
*ProcedureAddress = (PVOID)RVA(BaseAddress, AddressPtr[OrdinalPtr[mid]]);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
if (res > 0)
|
||||
maxn = mid - 1;
|
||||
|
||||
@@ -42,7 +42,7 @@ ANSI_STRING ExceptName = RTL_CONSTANT_STRING("KiUserExceptionDispatcher");
|
||||
ANSI_STRING CallbackName = RTL_CONSTANT_STRING("KiUserCallbackDispatcher");
|
||||
ANSI_STRING RaiseName = RTL_CONSTANT_STRING("KiRaiseUserExceptionDispatcher");
|
||||
ANSI_STRING FastName = RTL_CONSTANT_STRING("KiFastSystemCall");
|
||||
ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KeFastSystemCallRet");
|
||||
ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KiFastSystemCallRet");
|
||||
ANSI_STRING InterruptName = RTL_CONSTANT_STRING("KiIntSystemCall");
|
||||
|
||||
PHANDLE_TABLE PspCidTable;
|
||||
|
||||
Reference in New Issue
Block a user