implementation of __libc_init_memory()
authorThomas Bluemel <thomas@reactsoft.com>
Sat, 14 Aug 2004 00:39:19 +0000 (00:39 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Sat, 14 Aug 2004 00:39:19 +0000 (00:39 +0000)
svn path=/trunk/; revision=10520

reactos/lib/rosky/libsky/libsky.c
reactos/lib/rosky/libsky/stubs.c

index 870d565..e6d6f01 100644 (file)
@@ -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: libsky.c,v 1.3 2004/08/13 23:31:12 sedwards Exp $
+/* $Id: libsky.c,v 1.4 2004/08/14 00:39:19 weiden Exp $
  *
  * PROJECT:         SkyOS library
  * FILE:            lib/libsky/libsky.c
@@ -41,3 +41,17 @@ __to_kernel(int ret)
   ExitProcess(ret);
 }
 
+
+/*
+ * @implemented
+ */
+void __cdecl
+__libc_init_memory(void *end,
+                   void *__bss_end__,
+                   void *__bss_start__)
+{
+  DBG("__libc_init_memory: end=0x%x __bss_end__=0x%x __bss_start__=0x%x\n", end, __bss_end__, __bss_start__);
+  RtlZeroMemory(__bss_start__, (PCHAR)__bss_end__ - (PCHAR)__bss_start__);
+  /* FIXME - initialize other stuff */
+}
+
index e2b11ff..1f69401 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.3 2004/08/12 23:38:17 weiden Exp $
+/* $Id: stubs.c,v 1.4 2004/08/14 00:39:19 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         SkyOS library
 /* #define NDEBUG */
 #include "libsky.h"
 
-/*
- * @unimplemented
- */
-void __cdecl
-__libc_init_memory(void *end,
-                   void *__bss_end__,
-                   void *__bss_start__)
-{
-  STUB("__libc_init_memory: end=0x%x __bss_end__=0x%x __bss_start__=0x%x\n", end, __bss_end__, __bss_start__);
-  #if 1
-  RtlZeroMemory(__bss_start__, (PCHAR)__bss_end__ - (PCHAR)__bss_start__);
-  #else
-  RtlCopyMemory(__bss_start__, /* I think this function should initialize the data in the .bss section */
-                end, /* The source should be the pointer to raw of the EOF Extra Data, but how to get it?! It's not loaded to memory in win/ros */
-                (PCHAR)__bss_end__ - (PCHAR)__bss_start__); /* Or should we rather copy 0x2000 (raw size of EOF Extra data)? */
-  #endif
-}
-
 
 typedef void (__cdecl *func_ptr) (void);