Author: ros-arm-bringup
Date: Tue Jul 22 04:52:44 2008
New Revision: 34671
URL:
http://svn.reactos.org/svn/reactos?rev=34671&view=rev
Log:
- Remove dependency on GCC-specific extension: the kernel sets the base address of NTDLL
as the first argument of the user APC.
Modified:
trunk/reactos/dll/ntdll/ldr/startup.c
Modified: trunk/reactos/dll/ntdll/ldr/startup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/startup.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/startup.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/startup.c [iso-8859-1] Tue Jul 22 04:52:44 2008
@@ -21,8 +21,6 @@
/* GLOBALS *******************************************************************/
-
-extern unsigned int _image_base__;
static RTL_CRITICAL_SECTION PebLock;
static RTL_CRITICAL_SECTION LoaderLock;
@@ -256,6 +254,7 @@
WCHAR FullNtDllPath[MAX_PATH];
SYSTEM_BASIC_INFORMATION SystemInformation;
NTSTATUS Status;
+ PVOID BaseAddress = SystemArgument1;
DPRINT("LdrpInit()\n");
DPRINT("Peb %p\n", Peb);
@@ -398,7 +397,7 @@
}
memset(NtModule, 0, sizeof(LDR_DATA_TABLE_ENTRY));
- NtModule->DllBase = (PVOID)&_image_base__;
+ NtModule->DllBase = BaseAddress;
NtModule->EntryPoint = 0; /* no entry point */
RtlCreateUnicodeString (&NtModule->FullDllName,
FullNtDllPath);