This section is defined by the type SHT_SUNW_verdef. If this section exists a SHT_SUNW_versym section must also exist. Using these two structures an association of symbols to version definitions is maintained within the file (see "Creating a Version Definition" for more details). 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; |
This member identifies the version of the structure itself.
Name |
Value |
Meaning |
---|---|---|
VER_DEF_NONE |
0 |
Invalid version |
VER_DEF_CURRENT |
>=1 |
Current version |
The value 1 signifies the original section format; extensions will create new versions with higher numbers. The value of VER_DEF_CURRENT changes as necessary to reflect the current version number.
This member holds version definition specific information.
Name |
Value |
Meaning |
---|---|---|
VER_FLG_BASE |
0x1 |
Version definition of the file itself |
VER_FLG_WEAK |
0x2 |
Weak version identifier |
The base version definition is always present when version definitions, or symbol auto-reduction has been applied to the file. The base version provides a default version for the files reserved symbols (see "Generating the Output Image"). A weak version definition has no symbols associated with it (see "Creating a Weak Version Definition" for more details).
This member holds the version index. Each version definition has a unique index that is used to associate SHT_SUNW_versym entries to the appropriate version definition.
This member indicates the number of elements in the Elf32_Verdaux array.
This member holds the hash value of the version definition name (this value is generated using the same hashing function described in "Hash Table").
This member holds the byte offset, from the start of this Elf32_Verdef entry, to the Elf32_Verdaux array of version definition names. The first element of the array must exist and points to the version definition string this structure defines. Additional elements may be present, the number being indicated by the vd_cnt value. These elements represent the dependencies of this version definition. Each of these dependencies will have its own version definition structure.
This member holds the byte offset, from the start of this Elf32_Verdef structure, to the next Elf32_Verdef entry.
This member holds a string table offset to a null-terminated string, giving the name of the version definition.
This member holds the byte offset, from the start of this Elf32_Verdaux entry, to the next Elf32_Verdaux entry.