|
From: Nicholas N. <nj...@ca...> - 2003-09-24 16:00:13
|
On Wed, 24 Sep 2003, Gao, Jiafu wrote: > > my_program must rely on at least one shared object. > > I want to ask the reverse question: if my_program relies on one > shared object, will valgrind always work with my_program? > > The reason for my question is: if the answer is yes, then we can > come up a way to "remove" (at least in practical sense) this > requirement. For example: > > Ship a dummy shared object, see, vgdummy.so, with valgrind. It > has one function, see, VG_dummy() which basically does nothing. The > user program can call VG_dummy() and linked with vgdummy.so, then the > valgrind will work with the user program. We can make the VG_dummy() as > a Valgrind MACRO if desired. > > Just a quick thought. Correct me if I am smoking cracks:-) Doesn't seem like much of an improvement to me... the user still has to know about static linking causing problems. Once they know that, it's rarely(?) a problem to fix it. I think a better alternative is to use a patch Olly Betts submitted a while back: it makes Valgrind's startup script check with 'ldd' whether the program is statically linked, and aborts with a helpful explanatory message if so. Can anyone see any problems with this? If not, I'll consider committing it. N |