Go to main content

Oracle® Solaris 11.3 Programming Interfaces Guide

Exit Print View

Updated: April 2019
 
 

Defining the Oracle Solaris ABI

The Oracle Solaris ABI is defined in the Oracle Solaris libraries. These definitions are provided by means of the library versioning technology and policies used in the link editor and run-time linker.

Symbol Versioning in Oracle Solaris Libraries

The Oracle Solaris link editor and run-time linker use two kinds of library versioning: file versioning and symbol versioning. In file versioning, a library is named with an appended version number, such as libc.so.1. In a few cases, when an incompatible change is made to one or more public interfaces in that library, the version number is incremented. For example, libc.so.2.

Library symbol versioning associates a set of symbols with a symbol version name. The following is an example mapfile for a hypothetical Oracle Solaris library, libfoo.so.1.

$mapfile_version 2


SYMBOL_VERSION SUNWpublic 

{
            global:
                symbolA;
                symbolB;
                symbolC;
        };

        SYMBOL_VERSION 

SUNWprivate {
            global:
                __fooimpl;
            local:
                *;
        };

This mapfile indicates that symbolA, symbolB, and symbolC are associated with version SUNWpublic. The symbol __fooimpl is associated with SUNWprivate.


Note - The local: * directive in the mapfile causes any symbol in the library that is not explicitly associated with a named version, to be scoped locally to the library. Such locally scoped symbols are not visible outside the library. This convention ensures that symbols are only visible when associated with a symbol versioning name.

Using Symbol Versioning to Label the Oracle Solaris ABI

Since all visible symbols in a library belong to a named version, the naming scheme can be used to label the symbols' ABI status. This labeling is done by associating all private interfaces with a version name beginning with SUNWprivate. Public interfaces begin with other names, specifically:

  • SYSVABI, for interfaces defined by the System V ABI definition

  • SISCD, for interfaces defined by the SPARC International SPARC Compliance Definition

  • SUNWpublic, for interfaces defined by Oracle Corporation

  • SUNW_x[.y], for numbered public interfaces defined by Oracle in the older versions of the operating system.

The definition of the Oracle Solaris library ABI is therefore contained in the libraries, and consists of the set of symbols that are associated with symbol version names that do not begin with SUNWprivate. The pvs command lists the symbols in a library.