Summary: | Warn if executable is statically linked | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Nicholas Nethercote <njn> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | CC: | konstantin.s.serebryany, philippe.waroquiers, tom |
Priority: | NOR | ||
Version: | 3.5 SVN | ||
Target Milestone: | wanted3.6.0 | ||
Platform: | unspecified | ||
OS: | All | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Nicholas Nethercote
2009-06-29 08:01:39 UTC
Here is a related discussion: http://thread.gmane.org/gmane.comp.debugging.valgrind.devel/8199 Very useful feature! I would add there there should be a way to convert this warning into error (memcheck and helgrind are absolutely useless for static binaries) It's actually quite easy - a statically linked program won't have an interpreter so you just need to add something at the end of VG_(load_ELF) in coregrind/m_ume/elf.c to issue a warning (or set a flag to trigger a warning elsewhere) when interp is NULL. In fact the interpreter address is placed in ExeInfo as interp_base so you can use that as well, which is a bit more widely available. In 3.8.0 SVN, there is a new option --soname-synonyms which allows to have statically linked malloc lib to be intercepted. This command line option however only works if special redirections have been used in the vgprelaod (and the vgpreload must of course still be preloaded). Currently, only the malloc lib redirections of V have been modified to use --soname-synonyms |