-   Solaris / OpenSolaris (
-   -   "list dynamic dependency" of an executable using command other than "ldd" (

Amrita@3086 04-02-2007 03:03 AM

"list dynamic dependency" of an executable using command other than "ldd"
Hi all,
My application using dlopen() to load the Shared
But, The man page for ldd telling that,
"ldd does not list shared objects explicitly
attached using dlopen(3DL)

Is there any way to find the "dynamic dependency"
used by an executable
, other than "ldd command"

Thanks in advance.

jlliagre 04-02-2007 08:57 AM

You can trace all the files open by your application while it is running using truss, dtrace or apptrace:

$ apptrace -f ./dltest 2>&1 | grep dlopen
1290:-> a        -> * dlopen(const char * = 0x8050a1c "/lib/", int = 0x0)
1290:<- a        ->

Amrita@3086 04-04-2007 04:00 AM

Hi jlliagre,
Thanks for your response,
But i have one more queiry,

Yesterday when I used apptrace command it was working fine.
but today when I am using the same command it is not showing anything.
will you pelase tell me why is it so?
Thanks in advance.

jlliagre 04-04-2007 05:56 AM

If it doesn't show dlopen calls, then that must be because there are no more of them ...

Try removing the final "| grep dlopen" to see what other calls the command does.

All times are GMT -5. The time now is 05:07 AM.