[project @ 2005-03-05 16:19:14 by panne]
authorpanne <unknown>
Sat, 5 Mar 2005 16:19:18 +0000 (16:19 +0000)
committerpanne <unknown>
Sat, 5 Mar 2005 16:19:18 +0000 (16:19 +0000)
Nuked dead code. Now the RTS is free of warnings, except for failed
inlinings of thread_obj, processHeapClosureForDead, pop, and
push. Should we remove their "inline" modifier?

ghc/rts/Linker.c
ghc/rts/Schedule.c

index 5ea9d4e..7b9df7f 100644 (file)
@@ -2441,65 +2441,6 @@ findElfSection ( void* objImage, Elf_Word sh_type )
    return ptr;
 }
 
-static int
-findElfSectionIndexByName( ObjectCode *oc, const char *sh_name,
-                           Elf_Word expected_type, Elf_Word expected_entsize )
-{
-  Elf_Ehdr *ehdr = (Elf_Ehdr *) oc->image;
-  Elf_Shdr *shdr = (Elf_Shdr *) (oc->image + ehdr->e_shoff);
-  char *sectnames = oc->image + shdr[ehdr->e_shstrndx].sh_offset;
-  int i;
-
-  for( i = 0; i < ehdr->e_shnum; i++ )
-    if( !strcmp( sectnames + shdr[i].sh_name, sh_name ) )
-    {
-      if( shdr[i].sh_type != expected_type )
-      {
-        errorBelch( "The entry type (%d) of the '%s' section isn't %d\n",
-                    shdr[i].sh_type, sh_name, expected_type );
-        return -1;
-      }
-
-      if( shdr[i].sh_entsize != expected_entsize )
-      {
-        errorBelch( "The entry size (%d) of the '%s' section isn't %d\n",
-                    shdr[i].sh_entsize, sh_name, expected_entsize );
-
-        return -1;
-      }
-
-      return i;
-    }
-
-  errorBelch( "This ELF file contains no '%s' section", sh_name );
-  return -1;
-}
-
-static char *
-findElfSectionByName( ObjectCode *oc, const char *sh_name,
-                      Elf_Word expected_type, int expected_entsize,
-                      int *num_entries )
-{
-  Elf_Ehdr *ehdr = (Elf_Ehdr *) oc->image;
-  Elf_Shdr *shdr = (Elf_Shdr *) (oc->image + ehdr->e_shoff);
-  int section;
-
-  section = findElfSectionIndexByName( oc, sh_name, expected_type,
-                                       expected_entsize );
-
-  if( section < 0 )
-    return NULL;
-
-  /* allow for meaningful results in num_entries even when entsize is 0 */
-  if( expected_entsize == 0 )
-    expected_entsize = 1;
-
-  if( num_entries )
-    *num_entries = shdr[section].sh_size / expected_entsize;
-
-  return oc->image + shdr[section].sh_offset;
-}
-
 #if defined(ia64_HOST_ARCH)
 static Elf_Addr
 findElfSegment ( void* objImage, Elf_Addr vaddr )
index 6f4e5f9..e2e1db2 100644 (file)
@@ -222,10 +222,6 @@ void            addToBlockedQueue ( StgTSO *tso );
 static void     schedule          ( StgMainThread *mainThread, Capability *initialCapability );
        void     interruptStgRts   ( void );
 
-#if !defined(PAR) && !defined(RTS_SUPPORTS_THREADS)
-static void     detectBlackHoles  ( void );
-#endif
-
 static void     raiseAsync_(StgTSO *tso, StgClosure *exception, rtsBool stop_at_atomically);
 
 #if defined(RTS_SUPPORTS_THREADS)