DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Shared libraries

Providing compatibility with non-shared libraries

Having compatible libraries makes it easy to substitute one for the other. In almost all cases, this can be done without makefile or source file changes. For example, the shared C library is built using the existing non-shared library as the base. The host library archive file is compatible with the relocatable non-shared C library. However, the shared library target file does not include all routines from the archive, because including them all would have hurt performance.

These goals are reached as follows. The host library is built in two steps. First, the available shared library tools are used to create the host library to exactly match the target. The resulting archive file may not be compatible with the archive C library at this point. Second, add to the host library the set of relocatable objects residing in the archive C library that are missing from the host library. Although this set is not in the shared library target, its inclusion in the host library makes the relocatable and shared C libraries compatible.


Next topic: Tuning the shared library code
Previous topic: Using or building a shared library

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003