title: Valgrind for ARM with Linaro Toolchain requiring libc6-dbg with Buildroot
body: <p>I cross compiled Valgrind (http://valgrind.org/downloads/valgrind-3.8.1.tar.bz2) for ARM using the following commands with the Linaro Toolchain on my Ubuntu 10.04 host ( I am using Buildroot ):</p>
  
  <pre><code>export PATH=$PATH:/home/user/toolchain/linaro/bin
  CC=arm-linux-gnueabi-gcc CFLAGS=-I/home/user/toolchain/linaro/arm-linux-gnueabi/libc/usr/include LDFLAGS=-L/home/user/toolchain/linaro/arm-linux-gnueabi/libc/usr/lib ./configure --prefix=/opt/valgrind --host=armv7-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i386-ubuntu-linux
  make
  sudo make install
  </code></pre>
  
  <p>When I copy the binaries to my ARM target board, I get the following error:</p>
  
  <pre><code>==413== Memcheck, a memory error detector
  ==413== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
  ==413== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
  ==413== Command: /home/user/testApp
  ==413== 
  
  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:      memcpy
  valgrind:  in an object with soname matching:   ld-linux.so.3
  valgrind:  was not found whilst processing
  valgrind:  symbols from the object with soname: ld-linux.so.3
  valgrind:  
  valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
  valgrind:  package on this machine.  (2, longer term): ask the packagers
  valgrind:  for your Linux distribution to please in future ship a non-
  valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
  valgrind:  that exports the above-named function using the standard
  valgrind:  calling conventions for this platform.  The package you need
  valgrind:  to install for fix (1) is called
  valgrind:  
  valgrind:    On Debian, Ubuntu:                 libc6-dbg
  valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
  valgrind:  
  valgrind:  Cannot continue -- exiting now.  Sorry.
  </code></pre>
  
  <p>My Linaro Toolchain Version is:</p>
  
  <pre><code>gcc version 4.7.1 20120402 (prerelease) (crosstool-NG linaro-1.13.1-2012.04-20120426 - Linaro GCC 2012.04) 
  </code></pre>
  
  <p>I've searched around on Google but cannot find a solution to this. How can I get Valgrind to work on my target board? I use Buildroot to build my system but libc6-dbg is not a package I can find in the build system. Is there some directory or files I need to copy from the toolchain sysroot? Thanks -</p>
  
  <p>The command I am using to run Valgrind is shown here:</p>
  
  <pre><code># which valgrind
  /usr/bin/valgrind
  # valgrind /home/user/MyQtApp
  ==216== Memcheck, a memory error detector
  ...
  ...
  </code></pre>