05.08.2013 Views

Solaris Application Programming, 1/e - Chapter 4 - Parent Directory

Solaris Application Programming, 1/e - Chapter 4 - Parent Directory

Solaris Application Programming, 1/e - Chapter 4 - Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.5 INFORMATION ABOUT APPLICATIONS 89<br />

It is also possible to list the symbols defined in a library using the -s flag. Part<br />

of the output of this for libdl.so.1 is shown in Example 4.60.<br />

Example 4.60 Versions of Functions Exported by libdl.so.1<br />

$ pvs -ds /usr/lib/libdl.so.1<br />

libdl.so.1:<br />

_DYNAMIC;<br />

_edata;<br />

_etext;<br />

_end;<br />

_PROCEDURE_LINKAGE_TABLE_;<br />

SUNW_1.4:<br />

dladdr1;<br />

SUNW_1.3:<br />

SUNW_1.2:<br />

SUNW_1.1:<br />

dlmopen;<br />

dldump;<br />

dlinfo;<br />

...<br />

4.5.5 Examining the Disassembly of an <strong>Application</strong>, Library, or<br />

Object (dis)<br />

The dis utility will disassemble libraries, applications, and object files. An example<br />

of this is shown in Example 4.61.<br />

$ /usr/ccs/bin/dis a.out<br />

**** DISASSEMBLER ****<br />

disassembly for a.out<br />

Example 4.61 Example of Using dis<br />

section .text<br />

_start()<br />

10694: bc 10 20 00 clr %fp<br />

10698: e0 03 a0 40 ld [%sp + 0x40], %l0<br />

1069c: 13 00 00 83 sethi %hi(0x20c00), %o1<br />

106a0: e0 22 61 8c st %l0, [%o1 + 0x18c]<br />

106a4: a2 03 a0 44 add %sp, 0x44, %l1<br />

...

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!