This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sprof fails to dlopen library


On Thu, Apr 11, 2002 at 03:56:34AM +0100, John Levon wrote:
> On Wed, Apr 10, 2002 at 08:51:51PM -0400, Daniel Jacobowitz wrote:
> 
> > Hmm... if the dlopen() failed, could it be that libAiksaurus depends on
> > some other symbols being evailable?
> 
> Ah, it's a C++ library dynamically linked against libstdc++.
> 
> > What was the printed error message?
> 
> sprof: failed to load shared object `libAiksaurus.so'
> 
> Indeed it looks like it fails to find e.g. cerr :
> 
> moz moz 843 LD_DEBUG=all sprof libAiksaurus.so 2>&1 | grep binding | grep cerr
> moz moz 844
> 
> then,
> 
> moz moz 854 LD_PRELOAD=/usr/lib/libstdc++-libc6.2-2.so.3 sprof libAiksaurus.so /var/tmp/libAiksaurus.so.0.profile
> 
> is successful !
> 

Why did you need to do that? I fixed it a long time ago:

2001-09-20  H.J. Lu  <hjl@gnu.org>

        * include/dlfcn.h (__RTLD_SPROF): New definiton.
        * elf/dl-open.c (dl_open_worker): Return immediately after loading 
        for __RTLD_SPROF.


H.J.
        * elf/sprof.c (main): Default to the filename if soname doesn't exist.
        (load_shobj): Call dlopen with `RTLD_LAZY | __RTLD_SPROF'.



H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]