Operating System - HP-UX
1753875 Members
7550 Online
108809 Solutions
New Discussion юеВ

How do I read what is in a shared library (.sl)

 
SOLVED
Go to solution
Ian Warner
Trusted Contributor

How do I read what is in a shared library (.sl)

I have a list of .sl files, one of which contains a particular entry point. How do I check each .sl to discover which one it is?
Why did anyone invent unix?
4 REPLIES 4
Steve Lewis
Honored Contributor
Solution

Re: How do I read what is in a shared library (.sl)

Use the nm command on the shared library file to get the symbols (functions and data structures).


Rainer von Bongartz
Honored Contributor

Re: How do I read what is in a shared library (.sl)

use nm

nm - print name list of common object file


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
ranganath ramachandra
Esteemed Contributor

Re: How do I read what is in a shared library (.sl)

use "odump -slexp libname.sl | grep -v Unsat" for PA32 and "elfdump -t libname.sl | grep -v UNDEF" for PA64/IA shared libraries.
 
--
ranga
[i work for hpe]

Accept or Kudo

Saravanan_11
Occasional Advisor

Re: How do I read what is in a shared library (.sl)

Hai,

We can find the printable strings in a shared library with the help of strings command.

nm command : To print name list of common object file. i.e Symbol table information is printed thru nm command.

strings command : To find the printable strings in an object or other binary file

# strings libcma.sl | grep cma__get_mutex
cma__get_mutex
cma__get_mutex
# nm libcma.sl | grep cma__get_mutex
cma__get_mutex | 128736|uext |stub |
cma__get_mutex | 206536|extern|entry |
cma__get_mutex | 206560|extern|code |$CODE$
ma__get_mutex | 398952|uext |stub |
#

# elfdump -tx test | grep read
3 SECT LOCL 0 0x1d (0x1d ) 0x400000e0 0 __thread_specific_seg
40 FUNC WEAK 0 UNDEF (UNDEF ) 0x0422b740 0 read
80 FUNC WEAK 0 UNDEF (UNDEF ) 0x0422b740 0 read
#

we can find with elfdump -tx option in IPF machine

Regards,
Saravanan