]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
For the ld.so redirections for arm32-linux, allow the soname
authorJulian Seward <jseward@acm.org>
Thu, 24 Apr 2014 23:47:16 +0000 (23:47 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 24 Apr 2014 23:47:16 +0000 (23:47 +0000)
ld-linux-armhf.so.3 in addition to the existing name, ld-linux.so.3.

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

coregrind/m_redir.c

index 69d0f3779bb753ab7293fa42ef90fe483174d258..e5dc248931c225e08157dce461037546573e312e 100644 (file)
@@ -1299,24 +1299,33 @@ void VG_(redir_initialise) ( void )
    }
 
 #  elif defined(VGP_arm_linux)
-   /* If we're using memcheck, use these intercepts right from
-      the start, otherwise ld.so makes a lot of noise. */
+   /* If we're using memcheck, use these intercepts right from the
+      start, otherwise ld.so makes a lot of noise.  In most ARM-linux
+      distros, ld.so's soname is ld-linux.so.3, but Ubuntu 14.04 on
+      Odroid uses ld-linux-armhf.so.3 for some reason. */
    if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
+      /* strlen */
       add_hardwired_spec(
          "ld-linux.so.3", "strlen",
          (Addr)&VG_(arm_linux_REDIR_FOR_strlen),
          complain_about_stripped_glibc_ldso
       );
-      //add_hardwired_spec(
-      //   "ld-linux.so.3", "index",
-      //   (Addr)&VG_(arm_linux_REDIR_FOR_index),
-      //   NULL 
-      //);
+      add_hardwired_spec(
+         "ld-linux-armhf.so.3", "strlen",
+         (Addr)&VG_(arm_linux_REDIR_FOR_strlen),
+         complain_about_stripped_glibc_ldso
+      );
+      /* memcpy */
       add_hardwired_spec(
          "ld-linux.so.3", "memcpy",
          (Addr)&VG_(arm_linux_REDIR_FOR_memcpy),
          complain_about_stripped_glibc_ldso
       );
+      add_hardwired_spec(
+         "ld-linux-armhf.so.3", "memcpy",
+         (Addr)&VG_(arm_linux_REDIR_FOR_memcpy),
+         complain_about_stripped_glibc_ldso
+      );
    }
 
 #  elif defined(VGP_arm64_linux)