Linux pvs command

Updated: 05/04/2019 by Computer Hope
pvs command

On some Unix-like operating systems, the pvs command displays the internal version information of dynamic objects within an ELF file.

Description

Commonly, ELF files are dynamic executables and shared objects, and possibly relocatable objects. This version information can fall into one of the following two categories:

Version definitions described the interface made available by an ELF file. Each version definition is associated to a set of global symbols provided by the file.

Version dependencies describe the binding requirements of dynamic objects on the version definition of any shared object dependencies. When a dynamic object is built with a shared object, the link-editor records information in the dynamic object indicating that the shared object is a dependency.

Syntax

pvs [-d] [-l] [-n] [-o] [-r] [-s] [-v] [-N name] file

Options

-d Print version definition information.
-l When used with the -s option, print any symbols that were reduced from global to local binding due to versioning. By convention, these symbol entries are located in the .symtab section, and fall between the FILE symbol representing the output file, and the FILE symbol representing the first input file used to generate the output file. These reduced symbol entries are assigned the fabricated version definition _REDUCED_. No reduced symbols will be printed if the file was stripped, or if the symbol entry convention cannot be determined.
-n Normalize version definition information. By default, all version definitions in the object are displayed. However, version definitions may inherit other version definitions, and under normalization only the head of each inheritance list is displayed.
-o Create one-line version definition output. By default, file, version definitions, and any symbol output is indented to ease human inspection. This option prefixes each output line with the file and version definition name and may be more useful for analysis with automated tools.
-r Print version dependency (requirements) information.
-s Print the symbols associated with each version definition. Any data symbols are accompanied with the size, in bytes, of the data item.
-v Verbose output. Indicates any weak version definitions, and any version definition inheritance. When used with the -N and -d options, the inheritance of the base version definition is also shown. When used with the -s option, the version symbol definition is also shown.
-N name Print only the information for the given version definition name and any of its inherited version definitions (when used with the -d option), or for the given dependency file name (when used with the -r option).
file The ELF file where internal version information is displayed.

Examples

pvs -d /usr/lib/libelf.so.1

Display version definition of the ELF file libelf.so.1

ld — Link editor for object files.
ldd — List dynamic dependencies of executable files or shared objects.