Version definitions describe the interfaces made available by an ELF file. Each version definition is associated to a set of global symbols provided by the file. Version definitions may be assigned to a file during its creation by the link-editor using the -M option and the associated mapfile directives (see the for more details).
Version dependencies describe the binding requirements of dynamic objects on the version definitions 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. This dependency must be satisfied at runtime. If the shared object also contains version definitions, then those version definitions that satisfy the global symbol requirements of the dynamic object will also be recorded in the dynamic object being created. At process initialization, the runtime linker will use any version dependencies as a means of validating the interface requirements of the dynamic objects used to construct the process.
example% pvs -d /usr/lib/libelf.so.1 libelf.so.1; SUNW.1.1
A normalized, one-liner display, suitable for creating a mapfile version control directive can be created using the -n and -o options:
example% pvs -don /usr/lib/libelf.so.1 /usr/lib/libelf.so.1 - SUNW.1.1;The following example displays the version requirements of ldd, and pvs:
example% pvs -r /usr/bin/ldd /usr/bin/pvs /usr/bin/ldd: libelf.so.1 (SUNW.1.1); libc.so.1 (SUNW.1.1); /usr/bin/pvs: libelf.so.1 (SUNW.1.1); libc.so.1 (SUNW.1.1);Exit Status
- Successful completion.
- non-zero
- Requested version information not found. If the requested version information is not found a non-zero value is returned, otherwise a zero value is returned. Version information is determined not found when; the -d option is specified and no version definitions are found; the -r option is specified and no version requirements are found; neither the -d or -r option is specified and no version definitions or version requirements are found.
See Also
ld(1) , ldd(1) , elf(3E)