Go to main content

Oracle® Solaris 11.4 Linkers and Libraries Guide

Exit Print View

Updated: February 2021
Chapter 6

Symbol Capabilities Example

The following sections provide a simple example for creating and exercising symbol capabilities variants. The variants don't use the capabilities they are defined to need, but simply use printf() to observe their selection at runtime. The intent behind this example is to capture the creation and execution of a capabilities family in a simple framework. This framework can act as a seed for creating your own capabilities build environment.

For demonstration purposes this example uses the x86 capabilities AES and AVX. In a real solution, each variant should contain implementations that have been created to target specific systems. The capabilities of these variants are normally established by the compiler, rather than from a mapfile as shown here.

For a complete discussion of creating and using symbol capabilities see Capability Processing, and specifically Creating a Family of Symbol Capabilities Functions.