[project @ 2002-09-05 08:58:55 by simonmar]
[ghc-hetmet.git] / ghc / rts / Linker.c
index 9ccd9a6..eb330c1 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Linker.c,v 1.97 2002/07/02 10:22:13 wolfgang Exp $
+ * $Id: Linker.c,v 1.102 2002/09/05 08:58:56 simonmar Exp $
  *
  * (c) The GHC Team, 2000, 2001
  *
@@ -24,6 +24,9 @@
 #include <sys/types.h>
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
@@ -59,6 +62,7 @@
 #elif defined(cygwin32_TARGET_OS) || defined (mingw32_TARGET_OS)
 #  define OBJFORMAT_PEi386
 #  include <windows.h>
+#  include <math.h>
 #elif defined(darwin_TARGET_OS)
 #  define OBJFORMAT_MACHO
 #  include <mach-o/loader.h>
@@ -67,7 +71,7 @@
 #endif
 
 /* Hash table mapping symbol names to Symbol */
-/*Str*/HashTable *symhash;
+static /*Str*/HashTable *symhash;
 
 #if defined(OBJFORMAT_ELF)
 static int ocVerifyImage_ELF    ( ObjectCode* oc );
@@ -210,7 +214,6 @@ typedef struct _RtsSymbolVal {
    executable, so we have to employ this hack. */
 #define RTS_MINGW_ONLY_SYMBOLS                  \
       SymX(memset)                              \
-      SymX(memset)                              \
       SymX(inet_ntoa)                           \
       SymX(inet_addr)                           \
       SymX(htonl)                               \
@@ -286,7 +289,6 @@ typedef struct _RtsSymbolVal {
       Maybe_ForeignObj                         \
       Maybe_Stable_Names                       \
       Sym(StgReturn)                           \
-      Sym(__stginit_GHCziPrim)                 \
       Sym(init_stack)                          \
       SymX(__stg_chk_0)                                \
       SymX(__stg_chk_1)                                \
@@ -405,7 +407,6 @@ typedef struct _RtsSymbolVal {
       SymX(rts_evalIO)                         \
       SymX(rts_evalLazyIO)                     \
       SymX(rts_eval_)                          \
-      SymX(rts_getAddr)                                \
       SymX(rts_getBool)                                \
       SymX(rts_getChar)                                \
       SymX(rts_getDouble)                      \
@@ -417,7 +418,6 @@ typedef struct _RtsSymbolVal {
       SymX(rts_getThreadId)                    \
       SymX(rts_getWord)                                \
       SymX(rts_getWord32)                      \
-      SymX(rts_mkAddr)                         \
       SymX(rts_mkBool)                         \
       SymX(rts_mkChar)                         \
       SymX(rts_mkDouble)                       \