This section is defined by the type SHT_SUNW_verneed. This section compliments the dynamic dependency requirements of the file by indicating the version definitions required from these dependencies. Only if a dependency contains version definitions will a recording be made in this section. Elements of this section have the following structure:
typedef struct { Elf32_Half vn_version; Elf32_Half vn_cnt; Elf32_Word vn_file; Elf32_Word vn_aux; Elf32_Word vn_next; } Elf32_Verneed; typedef struct { Elf32_Word vna_hash; Elf32_Half vna_flags; Elf32_Half vna_other; Elf32_Word vna_name; Elf32_Word vna_next; } Elf32_Vernaux; typedef struct { Elf64_Half vn_version; Elf64_Half vn_cnt; Elf64_Word vn_file; Elf64_Word vn_aux; Elf64_Word vn_next; } Elf64_Verneed; typedef struct { Elf64_Word vna_hash; Elf64_Half vna_flags; Elf64_Half vna_other; Elf64_Word vna_name; Elf64_Word vna_next; } Elf64_Vernaux; |
This member identifies the version of the structure itself.
Name |
Value |
Meaning |
---|---|---|
VER_NEED_NONE |
0 |
Invalid version |
VER_NEED_CURRENT |
>=1 |
Current version |
The value 1 signifies the original section format; extensions will create new versions with higher numbers. The value of VER_NEED_CURRENT changes as necessary to reflect the current version number.
This member indicates the number of elements in the Elf32_Vernaux array.
This member holds a string table offset to a null-terminated string, giving the filename having a version dependency. This name will match one of the .dynamic dependencies (refer to "Dynamic Section") found in the file.
This member holds the byte offset, from the start of this Elf32_Verneed entry, to the Elf32_Vernaux array of version definitions required from the associated file dependency. There must exist at least one version dependency. Additional version dependencies can be present, the number being indicated by the vn_cnt value.
This member holds the byte offset, from the start of this Elf32_Verneed entry, to the next Elf32_Verneed entry.
This member holds the hash value of the version dependency name (this value is generated using the same hashing function described in "Hash Table").
This member holds version dependency specific information.
Name |
Value |
Meaning |
---|---|---|
VER_FLG_WEAK |
0x2 |
Weak version identifier |
A weak version dependency indicates an original binding to a weak version definition. See "Creating a Version Definition"for more details.
This member is presently unused.
This member holds a string table offset to a null-terminated string, giving the name of the version dependency.
This member holds the byte offset, from the start of this Elf32_Vernaux entry, to the next Elf32_Vernaux entry.