Unix Programming - Libraries used by an executable.

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2005 > Libraries used by an executable.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Libraries used by an executable.
jay

2005-10-24, 3:47 pm

Hi,

While running or debugging a program, is there any command to know what all
libraries are used by the program?

Thanks
Jay


Thobias Vakayil

2005-10-24, 3:47 pm

Hi,

Execute the following command :
ldd <program name>

This will show all the run time libraries used.
If something is not present, then update the LD_LIBRARY_PATH

Regards,
Thobias
jay wrote:

>Hi,
>
>While running or debugging a program, is there any command to know what all
>libraries are used by the program?
>
>Thanks
>Jay
>
>
>
>



--
Thobias Vakayil
Alcatel Development India (ADI)
PH: 2349961/72/86 EXTN :7018
Paul Pluzhnikov

2005-10-24, 3:47 pm

"jay" <qwerty@asdf.lkj> writes:

> While running or debugging a program, is there any command to know what all
> libraries are used by the program?


The answer to both questions is system specific. Next time please
specify which system you are interested in.

On Linux, Solaris and many other common OSes, "ldd a.out" will
print a list of shared libraries the executable directly depends on.

If debugging with 'gdb', the "info shared" command will print a
list of shared libraries currently loaded into the process. Note
that this list may be bigger then the one printed by 'ldd', because
shared libraries could also be loaded at runtime.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Henry Townsend

2005-10-24, 3:47 pm

Paul Pluzhnikov wrote:
> If debugging with 'gdb', the "info shared" command will print a
> list of shared libraries currently loaded into the process. Note
> that this list may be bigger then the one printed by 'ldd', because
> shared libraries could also be loaded at runtime.


Also, if on Solaris, have a look at "man pldd".
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com