Re: [Valgrind-users] Valgrind can't find strcmp in ld.so

2016-09-22 Thread Kirill Frolov
On 09/22/2016 06:53 PM, Mikhail Baikov wrote:
> valgrind:  A must-be-redirected function
> valgrind:  whose name matches the pattern:  strcmp
> valgrind:  in an object with soname matching: ld-linux-armhf.so.3
> valgrind:  was not found whilst processing
> valgrind:  symbols from the object with soname: ld-linux-armhf.so.3
Look at coregrind/m_redir.c:1364

/* 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. */

...

   /* strcmp */
   add_hardwired_spec(
  "ld-linux.so.3", "strcmp",
  (Addr)&VG_(arm_linux_REDIR_FOR_strcmp),
  complain_about_stripped_glibc_ldso
   );


   I think, on some machines running linux strcmp() function resides in 
ld-linux.so. But look on same for x86: just NULL passed to 
add_hardwired_spec() function. I think, you need to do the same.


--
___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


[Valgrind-users] Valgrind can't find strcmp in ld.so

2016-09-22 Thread Mikhail Baikov
Hello.

I need some help. I want to start valgrind but get this error.

# /mnt/nfs/bin/valgrind/bin/valgrind ls
==933== Memcheck, a memory error detector
==933== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==933== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==933== Command: ls
==933==

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:  strcmp
valgrind:  in an object with soname matching: ld-linux-armhf.so.3
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-armhf.so.3

libc.so and ld.so aren't stripped

$ file ld-2.18-2013.10.so
ld-2.18-2013.10.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 
(SYSV), dynamically linked, not stripped
$ file libc-2.18-2013.10.so
libc-2.18-2013.10.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 
(SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for 
GNU/Linux 2.6.16, not stripped

And I do not see any mentions about strcmp in ld.so but I see it libc.so

# readelf -a /lib/libc.so.6 | grep strcmp
   2069: 00059bf122 FUNCGLOBAL DEFAULT   12 strcmp@@GLIBC_2.4
# readelf -a /lib/ld-linux-armhf.so.3 | grep strcmp


How can I make valgrind work?

-- 
Sincerely
Mihail Baikov


--
___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users