]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Refine the PLT-bypassing-bypassing machinery so it works on Red Hat 9.
authorJulian Seward <jseward@acm.org>
Sun, 13 Jul 2003 00:53:22 +0000 (00:53 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 13 Jul 2003 00:53:22 +0000 (00:53 +0000)
This means we are now are zero regression test failures on RH9 too.  Yay.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1752

coregrind/vg_symtab2.c

index a79342d56b1e1f6c896a2e6b66ac44e8279c9384..66d68494fe6c7e5ee4fcb3297bb576d06e4858b9 100644 (file)
@@ -2037,10 +2037,9 @@ static Addr reverse_search_one_symtab ( SegInfo* si,
 {
    UInt i;
    for (i = 0; i < si->symtab_used; i++) {
-      /*
-      VG_(printf)("%p %s\n",  si->symtab[i].addr, 
-                  &si->strtab[si->symtab[i].nmoff]);
-      */
+      if (0) 
+         VG_(printf)("%p %s\n",  si->symtab[i].addr, 
+                     &si->strtab[si->symtab[i].nmoff]);
       if (0 == VG_(strcmp)(name, &si->strtab[si->symtab[i].nmoff]))
          return si->symtab[i].addr;
    }
@@ -2367,7 +2366,7 @@ CodeRedirect VG_(code_redirect_table)[VG_N_CODE_REDIRECTS];
 
 Int VG_(setup_code_redirect_table) ( void )
 {
-#  define N_SUBSTS 3
+#  define N_SUBSTS 6
 
    Int     i, j;
    Addr    a_libc, a_pth;
@@ -2375,24 +2374,33 @@ Int VG_(setup_code_redirect_table) ( void )
 
    /* Original entry points to look for in libc. */
    static Char* libc_names[N_SUBSTS]
-     = { "__GI___errno_location",
-         "__GI___h_errno_location",
-         "__GI___res_state" };
+     = { "__GI___errno_location"
+       , "__errno_location"
+       , "__GI___h_errno_location"
+       , "__h_errno_location"
+       , "__GI___res_state" 
+       , "__res_state"
+       };
 
    /* Corresponding substitute address in our pthread lib. */
    static Char* pth_names[N_SUBSTS]
-     = { "__errno_location",
-         "__h_errno_location",
-         "__res_state" };
+     = { "__errno_location"
+       , "__errno_location"
+       , "__h_errno_location"
+       , "__h_errno_location"
+       , "__res_state" 
+       , "__res_state"
+       };
 
    /* Look for the SegInfo for glibc and our pthread library. */
 
    si_libc = si_pth = NULL;
 
    for (si = segInfo; si != NULL; si = si->next) {
-      if (NULL != VG_(strstr)(si->filename, "/libc.so"))
+      if (VG_(strstr)(si->filename, "/libc-2.3.2.so")
+          || VG_(strstr)(si->filename, "/libc.so"))
          si_libc = si;
-      if (NULL != VG_(strstr)(si->filename, "/libpthread.so"))
+      if (VG_(strstr)(si->filename, "/libpthread.so"))
          si_pth = si;
    }