- Removed dirty loading of symbol files from ExpInitializeExecutive.

- Prevented moving of KiSystemStartup into _main, because the memory
  from _main is freed from within KiSystemStartup.

svn path=/trunk/; revision=8752
This commit is contained in:
Hartmut Birr 2004-03-15 21:10:34 +00:00
parent dcb0a46bfe
commit f983216b34

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: main.c,v 1.184 2004/01/13 03:23:11 arty Exp $ /* $Id: main.c,v 1.185 2004/03/15 21:10:34 hbirr Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c * FILE: ntoskrnl/ke/main.c
@ -629,28 +629,7 @@ ExpInitializeExecutive(VOID)
* Enter the kernel debugger before starting up the boot drivers * Enter the kernel debugger before starting up the boot drivers
*/ */
#ifdef KDBG #ifdef KDBG
{ KdbEnter();
/* Load the symbols */
UNICODE_STRING KWideModuleName;
for (i=0; i < KeLoaderBlock.ModsCount; i++)
{
RtlCreateUnicodeStringFromAsciiz(&KWideModuleName,
(PCHAR)KeLoaderModules[i].String);
LdrInitDebug(&KeLoaderModules[i],KWideModuleName.Buffer);
if( strstr((PCHAR)KeLoaderModules[i].String,".sym") ||
strstr((PCHAR)KeLoaderModules[i].String,".SYM") ) {
KdbProcessSymbolFile((PVOID)KeLoaderModules[i].ModStart,
(PCHAR)KeLoaderModules[i].String,
KeLoaderModules[i].ModEnd -
KeLoaderModules[i].ModEnd);
}
RtlFreeUnicodeString(&KWideModuleName);
}
KdbEnter();
}
#endif /* KDBG */ #endif /* KDBG */
IoCreateDriverList(); IoCreateDriverList();
@ -816,8 +795,7 @@ ExpInitializeExecutive(VOID)
NtClose(ProcessHandle); NtClose(ProcessHandle);
} }
VOID __attribute((noinline))
VOID
KiSystemStartup(BOOLEAN BootProcessor) KiSystemStartup(BOOLEAN BootProcessor)
{ {
HalInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); HalInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
@ -839,14 +817,7 @@ KiSystemStartup(BOOLEAN BootProcessor)
for(;;); for(;;);
} }
/* VOID INIT_FUNCTION
* FIXME:
* INIT_FUNCTION is temporary disabled, because if ntoskrnl is compiled with
* higher optimisation levels, gcc puts directly some code from KiSystemStartup
* into _main. This code frees the memory from the init section (_main) and
* that does crash reactos.
*/
VOID /*INIT_FUNCTION*/
_main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock) _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock)
/* /*
* FUNCTION: Called by the boot loader to start the kernel * FUNCTION: Called by the boot loader to start the kernel