This is the mail archive of the libc-help@sourceware.org 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: dlopen issue


On 1/12/2012 5:16 AM, naveen yadav wrote:
> Dear All,
> 
> I have precompiled source code. I want to know which are library are
> open using dlopen.
> I try to put printf in
> vi ../dlfcn/dlopen.c
> 
> Glibc compile well, but no print is coming when dlopen is called.
> Is this not the correct way ? If yes how can we get this info .
> 
> void *
> dlopen (const char *file, int mode)
> {
> 
>   printf("\n %s\n",file);
>   return __dlopen (file, mode, RETURN_ADDRESS (0));
> }

To get debug output from the dynamic loader run your program like this:

LD_DEBUG=all ./yourprogram

See the manual for the behaviour and settings of LD_DEBUG.

Cheers,
Carlos.
-- 
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos@codesourcery.com
+1 (613) 963 1026


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