Version Definition Section
This section is defined by the type SHT_SUNW_verdef. If this
section exists, a SHT_SUNW_versym section must also exist. These two
structures provide an association of symbols to version definitions within the file. See
Creating a Version Definition. Elements of this
section have the following structure.
typedef struct {
Elf32_Half vd_version;
Elf32_Half vd_flags;
Elf32_Half vd_ndx;
Elf32_Half vd_cnt;
Elf32_Word vd_hash;
Elf32_Word vd_aux;
Elf32_Word vd_next;
} Elf32_Verdef;
typedef struct {
Elf32_Word vda_name;
Elf32_Word vda_next;
} Elf32_Verdaux;
typedef struct {
Elf64_Half vd_version;
Elf64_Half vd_flags;
Elf64_Half vd_ndx;
Elf64_Half vd_cnt;
Elf64_Word vd_hash;
Elf64_Word vd_aux;
Elf64_Word vd_next;
} Elf64_Verdef;
typedef struct {
Elf64_Word vda_name;
Elf64_Word vda_next;
} Elf64_Verdaux;-
vd_version -
This member identifies the version of the structure, as listed in the following table.
Name Value Meaning VER_DEF_NONE0Invalid version.
VER_DEF_CURRENT>=1Current version.
The value 1 signifies the original section format. Extensions require new versions with higher numbers. The value of
VER_DEF_CURRENTchanges as necessary to reflect the current version number. -
vd_flags -
This member holds version definition-specific information, as listed in the following table.
Name Value Meaning VER_FLG_BASE0x1Version definition of the file.
VER_FLG_WEAK0x2Weak version identifier.
The base version definition is always present when version definitions, or symbol auto-reduction, have been applied to the file. The base version provides a default version for the files reserved symbols. A weak version definition has no symbols associated with the version. See Creating a Weak Version Definition.
-
vd_ndx -
The version index. Each version definition has a unique index that is used to associate
SHT_SUNW_versymentries to the appropriate version definition. -
vd_cnt -
The number of elements in the
Elf32_Verdauxarray. -
vd_hash -
The hash value of the version definition name. This value is generated using the same hashing function that is described in Hash Table Section.
-
vd_aux -
The byte offset from the start of this
Elf32_Verdefentry to theElf32_Verdauxarray of version definition names. The first element of the array must exist. This element points to the version definition string this structure defines. Additional elements can be present. The number of elements is indicated by thevd_cntvalue. These elements represent the dependencies of this version definition. Each of these dependencies will have its own version definition structure. -
vd_next -
The byte offset from the start of this
Elf32_Verdefstructure to the nextElf32_Verdefentry. -
vda_name -
The string table offset to a null-terminated string, giving the name of the version definition.
-
vda_next -
The byte offset from the start of this
Elf32_Verdauxentry to the nextElf32_Verdauxentry.