Replace inline C functions with C-- macros in .cmm code
[ghc-hetmet.git] / rts / Linker.c
index 0db2c5e..1919618 100644 (file)
@@ -333,6 +333,7 @@ typedef struct _RtsSymbolVal {
       Sym(mktime)                               \
       Sym(_imp___timezone)                      \
       Sym(_imp___tzname)                        \
+      Sym(_imp__tzname)                         \
       Sym(_imp___iob)                           \
       Sym(_imp___osver)                         \
       Sym(localtime)                            \
@@ -707,7 +708,8 @@ typedef struct _RtsSymbolVal {
       SymX(stg_interp_constr6_entry)            \
       SymX(stg_interp_constr7_entry)            \
       SymX(stg_interp_constr8_entry)            \
-      SymX(stgMallocBytesRWX)                   \
+      SymX(allocateExec)                       \
+      SymX(freeExec)                           \
       SymX(getAllocations)                      \
       SymX(revertCAFs)                          \
       SymX(RtsFlags)                            \
@@ -823,7 +825,7 @@ initFreeList(rootEntry *table, nat n, rootEntry *free)
   root_ptr_free = table;
 }
 
-void
+static void
 initRootPtrTable(void)
 {
   if (RPT_size > 0)
@@ -837,7 +839,7 @@ initRootPtrTable(void)
 }
 
 
-void
+static void
 enlargeRootPtrTable(void)
 {
   nat old_RPT_size = RPT_size;
@@ -856,7 +858,7 @@ static void
 addRootObject(void *addr)
 {
   StgWord rt;
-
+  initRootPtrTable();
   if (root_ptr_free == NULL) {
     enlargeRootPtrTable();
   }
@@ -954,7 +956,6 @@ initLinker( void )
       linker_init_done = 1;
     }
 
-    initRootPtrTable();
     stablehash = allocStrHashTable();
     symhash = allocStrHashTable();
 
@@ -2909,6 +2910,9 @@ ocVerifyImage_ELF ( ObjectCode* oc )
    IF_DEBUG(linker,debugBelch( "Architecture is " ));
    switch (ehdr->e_machine) {
       case EM_386:   IF_DEBUG(linker,debugBelch( "x86" )); break;
+#ifdef EM_SPARC32PLUS
+      case EM_SPARC32PLUS:
+#endif
       case EM_SPARC: IF_DEBUG(linker,debugBelch( "sparc" )); break;
 #ifdef EM_IA_64
       case EM_IA_64: IF_DEBUG(linker,debugBelch( "ia64" )); break;