Programming Tools Guide
Chapter 14, Shared libraries

Changing existing code for the shared library

Changing existing code for the shared library

All C code that works in a shared library will also work in a non-shared library. However, the reverse is not true because a shared library must explicitly handle imported symbols. The following guidelines are meant to help you produce shared library code that is still valid for non-shared libraries (although it may be slightly bigger and slower). The guidelines explain how to structure data for ease of maintenance, since most compatibility problems involve restructuring data.