From 447dd99842a5ee2b45dbb72efed37ede41799d86 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sun, 14 Dec 2003 18:16:18 +0000 Subject: [PATCH] - Do not place _main into the init section. If ntoskrnl is compiled with higher optimisation levels, some code from a non init section is internal moved to _main. This does crash reactos. svn path=/trunk/; revision=7052 --- reactos/ntoskrnl/ke/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index ee3e98dc7bd..466415b0c14 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: main.c,v 1.178 2003/11/16 15:17:46 hbirr Exp $ +/* $Id: main.c,v 1.179 2003/12/14 18:16:18 hbirr Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/main.c @@ -793,7 +793,14 @@ KiSystemStartup(BOOLEAN BootProcessor) 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) /* * FUNCTION: Called by the boot loader to start the kernel