Java Solaris Communities About Sun How to Buy United States Worldwide

Program Overview

An important consideration in the deployment of each new release of system software such as Solaris is maintaining binary compatibility with applications built to run on earlier releases. If developers are not able to maintain binary compatibility with applications from one release of Solaris to the next, customers face a dilemma. Even though a new release may be extremely desirable from the standpoint of being faster, more functional, and of higher quality, the customer may not be able to upgrade for the simple reason that the larger the investment that has been made in applications the more likely that one or more of them may fail to work on the newest release. As a result, the customer may not be able to upgrade to this release until much later, when the offending application is itself upgraded. Recompilation is often not an option for simple economic reasons: even if the source code is available, the cost in time and resources to recompile, revalidate, and redistribute large numbers of applications to large numbers of systems is prohibitive.

Binary compatibility is based upon a system's Application Binary Interface, which is the set of supported run-time interfaces available for applications to use (as opposed to the API, which is the set of build-time interfaces). The most important part of a system's ABI is the set of interfaces provided by its shared libraries.

The Solaris ABI Program develops technology to define the Solaris ABI and evaluate applications' compliance with it.

Defining the Solaris ABI

Since the 4/01 release of Solaris 8, the core Solaris system libraries contain within them the definition of their ABI. This ABI is viewable with the pvs command. Symbols associated with the string "SUNWprivate" are private interfaces reserved for use by Solaris only; symbols associated with other strings (typically "SUNW_m.n") are supported public interfaces for application use and are intended to be stable, i.e., to not change incompatibly from release to release of Solaris. Applications using only such public interfaces should have no problems in running on any subsequent release of Solaris.

Checking An Application's Interface Usage

An application's usage of system interfaces can be checked either statically or dynamically. The former is easier, but is forced to simulate what will actually happen at runtime. The Solaris ABI program has developed two tools for checking an application's usage of Solaris interfaces: a static tool, appcert, and a dynamic one, apptrace.

Appcert

Appcert is a Perl script that uses ldd(1) to resolve the symbol bindings in an ELF binary and compare the interfaces used against the ABI definition contained in the Solaris system libraries. It can thus spot usage of Solaris private interfaces (which may change from release to release), or other potential binary stability problems such as static linking of libraries. Because appcert is a static checker, it is not foolproof, but it catches many potential problems. Appcert has been part of Solaris since the 4/01 release of Solaris 8; an unbundled (and unsupported) version of appcert for releases prior to Solaris 8 is freely available for downloading.

Apptrace

Apptrace uses the link-auditing capability of the Solaris linker to trace calls from an application to the Solaris system libraries. It is thus similar to truss(1), but traces only calls to Solaris libraries. Apptrace allows one to verify the arguments and return values in library calls.

 
Contact About Sun News & Events Employment Site Map Privacy Terms of Use Trademarks Copyright 1994-2008 Sun Microsystems, Inc.