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.

88 <strong>Chapter</strong> 4 Informational Tools<br />

of a library. The older library API is still available, and the older applications<br />

will link to these versions. The newer API is also present, and the newer applications<br />

will link to this.<br />

The pvs utility prints out information about the functions and versions of those<br />

functions that a library exports, or the library versions that a library or executable<br />

requires. By default, pvs will report both the definitions in the library and the<br />

requirements of the library.<br />

Example 4.57 shows pvs reporting the versions of the libraries that the ls executable<br />

requires.<br />

Example 4.57 Libraries Required by the ls Command<br />

% pvs /bin/ls<br />

libc.so.1 (SUNW_1.19, SUNWprivate_1.1);<br />

The -r option, for displaying only the requirements of the file, can be used to<br />

show that libc.so.1 requires libdl.so.1, as demonstrated in Example 4.58.<br />

Example 4.58 Requirements of libc.so.1<br />

% pvs -r /usr/lib/libc.so.1<br />

libdl.so.1 (SUNW_1.4, SUNWprivate_1.1);<br />

The -d option shows the versions defined in the library. Example 4.59 shows<br />

part of the output of the versions defined in libc.so.1.<br />

% pvs -d /usr/lib/libc.so.1<br />

libc.so.1;<br />

SUNW_1.21.2;<br />

SUNW_1.21.1;<br />

SUNW_1.21;<br />

SUNW_1.20.4;<br />

....<br />

Example 4.59 Versions Defined in libc.so.1

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

Saved successfully!

Ooh no, something went wrong!