ChorusOS 5.0 Transition Guide

Support for Shared Libraries

Version 5.0 of the ChorusOS operating system provides support for shared libraries. Like dynamic libraries, shared libraries can be dynamically linked but unlike dynamic libraries, they are not duplicated in physical memory. When two actors, each with its own private copy of data, use the same shared library, only one instance of the library is present in physical memory.

Shared libraries use Position Independent Code (PIC) . In PIC, references to global symbols are made indirectly through symbol tables. References to global symbols, as well as local jumps, are made relative to the program counter. This code, as a result, can run anywhere in memory without being modified, but the tables must be relocated first before program execution can begin.

Position Independent Code in shared libraries performs less well than code in dynamic libraries because global symbol information is accessed through indirect references.

For more information on shared libraries, refer to "Libraries, Actors and Processes" in the ChorusOS 5.0 Application Developer's Guide.