On Sun, 2015-05-31 at 17:55 +0200, Joakim Sindholt wrote:
> I would like to be able to run memcheck on statically linked binaries,
> so I had a look at:
> http://valgrind.org/docs/manual/faq.html#faq.hiddenbug
> 
> "Second, if your program is statically linked, most Valgrind tools will
> only work well if they are able to replace certain functions, such as
> malloc, with their own versions. By default, statically linked malloc
> functions are not replaced. A key indicator of this is if Memcheck says:
> 
> All heap blocks were freed -- no leaks are possible
> 
> when you know your program calls malloc. The workaround is to use the
> option --soname-synonyms=somalloc=NONE or to avoid statically linking
> your program"
> 
> I couldn't get it to work so here's a minimal example that illustrates
> the problem:
malloc/free replacement will be done for a statically linked malloc
library.
But the dynamic linker is still needed for that replacement to work.

I have since a long time an idea in a corner to make all this
working on fully statically linked executable.

But too many ideas, not enough time ...

Philippe



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

Reply via email to