Linker and Libraries Guide

Version Symbol Section

The version symbol section is defined by the type SHT_SUNW_versym. This section consists of an array of elements of the following structure.

typedef Elf32_Half      Elf32_Versym;
typedef Elf64_Half      Elf64_Versym;

The number of elements of the array must equal the number of symbol table entries that are contained in the associated symbol table. This number is determined by the section's sh_link value. Each element of the array contains a single index that can have the values shown in the following table.

Table 7–24 ELF Version Dependency Indexes

Name 

Value 

Meaning 

VER_NDX_LOCAL

0

Symbol has local scope. 

VER_NDX_GLOBAL

1

Symbol has global scope and is assigned to the base version definition. 

 

>1

Symbol has global scope and is assigned to a user-defined version definition. 

Any index values that are greater than VER_NDX_GLOBAL must correspond to the vd_ndx value of an entry in the SHT_SUNW_verdef section. If no index values that are greater than VER_NDX_GLOBAL exist, then no SHT_SUNW_verdef section need be present.