命令行大全

pvs

瑞兹 发表于 2020-11-17 09:12浏览次数:

在某些类似Unix的操作系统上,pvs命令显示ELF文件中动态对象的内部版本信息。

查看英文版

目录:

1 pvs 运行系统环境

2 pvs 描述

3 pvs 语法

4 pvs 例子

pvs 运行系统环境

Linux

pvs 描述

通常,ELF文件是动态可执行文件和共享对象,甚至是可重定位的对象。此版本信息可以属于以下两种类别之一:

版本定义 描述了ELF文件提供的接口。每个版本定义都与文件提供的一组全局符号关联。

版本依赖关系 描述了动态对象对任何共享对象依赖关系的版本定义的绑定要求。当使用共享库构建动态对象时,链接编辑器会在动态对象内记录信息,指示共享库是依赖项。

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 within the dynamic object indicating that the shared object is a dependency.

查看英文版

查看中文版

pvs 语法

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

选件

-d 打印版本定义信息。
-l -s选项一起使用时,打印由于版本控制而从全局绑定减少到本地绑定的所有符号。按照惯例,这些符号条目位于的.symtab部分和下降之间FILE表示输出文件符号,并且FILE表示用来生成输出文件中的第一输入文件符号。为这些精简符号条目分配了虚构版本定义_REDUCED_。如果已删除文件或无法确定符号输入约定,则不会打印减少的符号。
-n 规范版本定义信息。默认情况下,显示对象内的所有版本定义。但是,版本定义可以继承其他版本定义,并且在规范化下仅显示每个继承列表的开头。
-o 创建单行版本定义输出。默认情况下,文件,版本定义以及任何符号输出均采用缩进格式,以便于人工检查。此选项在每个输出行的前面加上文件和版本定义名称,对于使用自动化工具进行分析可能更有用。
-r 打印版本依赖性(要求)信息。
-s 打印与每个版本定义关联的符号。任何数据符号都附带数据项的大小(以字节为单位)。
-v 详细输出。指示任何弱版本定义和任何版本定义继承。当与-N-d选项一起使用时,还将显示基本版本定义的继承。与-s选项一起使用时,还会显示版本符号定义。
-N name 仅打印给定版本定义名称及其任何继承版本定义的信息(与-d选项一起使用时),或给定依赖文件名称的信息(与-r选项一起使用时)。
file 显示其内部版本信息的ELF文件。
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 have been 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 has been stripped, or if the symbol entry convention cannot be determined.
-n Normalize version definition information. By default, all version definitions within 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 about which internal version information is displayed.

查看英文版

查看中文版

pvs 例子

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

显示ELF文件libelf.so.1的版本定义

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

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

查看英文版

查看中文版