LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (http://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   "list dynamic dependency" of an executable using command other than "ldd" (http://www.linuxquestions.org/questions/solaris-opensolaris-20/list-dynamic-dependency-of-an-executable-using-command-other-than-ldd-542561/)

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

"list dynamic dependency" of an executable using command other than "ldd"
 
Hi all,
My application using dlopen() to load the Shared
object.
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 07:57 AM

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

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


Amrita@3086 04-04-2007 03: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 04: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 04:31 AM.