LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to see shared objects code (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-see-shared-objects-code-817112/)

_Linux_Learner 06-30-2010 01:13 AM

how to see shared objects code
 
Hi all,

I want to know that is there any way to peep inside the shared object and see its code ????

Regards
_Linux_Learner

ozanbaba 06-30-2010 03:02 AM

what do you mean by "peep inside the shared objects"? if you want to see the original code then it's almost impossible to translate back to it (there's several tools for java).

doing a dissamble is easier but output is asm code.

check out the sources if there's open.

knudfl 06-30-2010 03:13 AM

May be .. (examples)

hexedit /usr/lib/libstdc++.so.6
readelf -s /usr/lib/libstdc++.so.6

.. if that is, what you want to watch.
..

16pide 06-30-2010 03:23 AM

objdump may be your friend.

I just tried:
objdump -Dslx /lib/libcap.so.2|more
but you want to look at the man page

another tool I use is strace (to debug system calls in a program execution). Not the same usage at all, but maybe you need that.

_Linux_Learner 06-30-2010 09:29 AM

Quote:

Originally Posted by 16pide (Post 4019068)
objdump may be your friend.

I just tried:
objdump -Dslx /lib/libcap.so.2|more
but you want to look at the man page

another tool I use is strace (to debug system calls in a program execution). Not the same usage at all, but maybe you need that.

Ok this commands worked well for me and I achieved the goal.. Thanks all


All times are GMT -5. The time now is 08:44 PM.