|
From: Bart V. A. <bar...@gm...> - 2008-04-11 16:25:55
|
On Wed, Apr 9, 2008 at 10:05 PM, Julian Seward <js...@ac...> wrote:
>
> > Using ... the gcc -nostartfiles or -nostdlib options, is
> > not recommended. Their use may result in undesired behavior, since
> > the constructor/destructor routines will not be executed (unless special
> > measures are taken).
> >
> > Is it correct that preloaded Valgrind shared objects are linked with
> > -nostdlib ?
>
> I put that in there in an attempt to minimise the dependencies on
> other shared libraries. Earlier in the life of the project there
> was much hassle caused by shared library dependencies, and ruthlessly
> removing dynamic linking as much as possible helped a lot. So I try
> to avoid shared library dependencies as much as possible now.
Are you aware that -nodefaultlibs does not link in any shared
libraries ? The ldd command reports the following information for
preload objects linked with -nodefaultlibs:
$ ldd memcheck/vgpreload_memcheck-amd64-linux.so
statically linked
Bart.
|