A SHT_SUNW_cap section identifies the hardware and software capabilities of an object. This section contains an array of the following structures. See sys/link.h.
typedef struct { Elf32_Word c_tag; union { Elf32_Word c_val; Elf32_Addr c_ptr; } c_un; } Elf32_Cap; typedef struct { Elf64_Xword c_tag; union { Elf64_Xword c_val; Elf64_Addr c_ptr; } c_un; } Elf64_Cap;
For each object with this type, c_tag controls the interpretation of c_un.
These objects represent integer values with various interpretations.
These objects represent program virtual addresses.
The following capabilities tags exist.
Table 7–12 ELF Capability Array Tags
Name |
Value |
c_un |
---|---|---|
CA_SUNW_NULL |
0 |
Ignored |
CA_SUNW_HW_1 |
1 |
c_val |
CA_SUNW_SF_1 |
2 |
c_val |
Marks the end of the capabilities array.
Indicates hardware capability values. The c_val element contains a value that represents the associated hardware capabilities. On SPARC platforms, hardware capabilities are defined in sys/auxv_SPARC.h. On x86 platforms, hardware capabilities are defined in sys/auxv_386.h.
Indicates software capability values. The c_val element contains a value that represents the associated software capabilities that are defined in sys/elf.h.
Relocatable objects can contain a capabilities section. The link-editor combines any capabilities sections from multiple input relocatable objects into a single capabilities section. The link-editor also allows capabilities to be defined at the time an object is built. See Identifying Hardware and Software Capabilities.
A dynamic object that contains a capabilities section that contains hardware capabilities information, has a PT_SUNWCAP program header associated to the section. This program header allows the runtime linker to validate the object against the hardware capabilities that are available to the process.
Dynamic objects that exploit different hardware capabilities can provide a flexible runtime environment using filters. See Hardware Capability Specific Shared Objects.