Author: weiden
Date: Wed Oct 4 20:51:51 2006
New Revision: 24397
URL:
http://svn.reactos.org/svn/reactos?rev=24397&view=rev
Log:
- Fix binary search algorithm in LdrGetProcedureAddress
- Fix temporary ntdll export hack (r24395)
Modified:
trunk/reactos/dll/ntdll/def/ntdll.def
trunk/reactos/dll/ntdll/main/i386/dispatch.S
trunk/reactos/ntoskrnl/ldr/rtl.c
trunk/reactos/ntoskrnl/ps/psmgr.c
Modified: trunk/reactos/dll/ntdll/def/ntdll.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.def?re…
==============================================================================
--- trunk/reactos/dll/ntdll/def/ntdll.def (original)
+++ trunk/reactos/dll/ntdll/def/ntdll.def Wed Oct 4 20:51:51 2006
@@ -38,7 +38,7 @@
KiUserCallbackDispatcher@12
KiUserExceptionDispatcher@8
KiIntSystemCall@0
-KeFastSystemCallRet@0 ; big hack since LdrGetProcedureAddress is broken
+KiFastSystemCallRet@0
KiFastSystemCall@0
LdrAccessResource@16
LdrAddRefDll@8
Modified: trunk/reactos/dll/ntdll/main/i386/dispatch.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/main/i386/dispat…
==============================================================================
--- trunk/reactos/dll/ntdll/main/i386/dispatch.S (original)
+++ trunk/reactos/dll/ntdll/main/i386/dispatch.S Wed Oct 4 20:51:51 2006
@@ -257,9 +257,9 @@
sysenter
.endfunc
-.func KeFastSystemCallRet@0
-.globl _KeFastSystemCallRet@0
-_KeFastSystemCallRet@0:
+.func KiFastSystemCallRet@0
+.globl _KiFastSystemCallRet@0
+_KiFastSystemCallRet@0:
/* Just return to caller */
ret
Modified: trunk/reactos/ntoskrnl/ldr/rtl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ldr/rtl.c?rev=243…
==============================================================================
--- trunk/reactos/ntoskrnl/ldr/rtl.c (original)
+++ trunk/reactos/ntoskrnl/ldr/rtl.c Wed Oct 4 20:51:51 2006
@@ -69,22 +69,15 @@
{
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;
Modified: trunk/reactos/ntoskrnl/ps/psmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=24…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/psmgr.c (original)
+++ trunk/reactos/ntoskrnl/ps/psmgr.c Wed Oct 4 20:51:51 2006
@@ -42,7 +42,7 @@
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;