Library (computing) - Shared Libraries

Shared Libraries

"Shared object" redirects here. For the synchronization mechanism, see Monitor (synchronization).

A shared library or shared object is a file that is intended to be shared by executable files and further shared objects files. Modules used by a program are loaded from individual shared objects into memory at load time or run time, rather than being copied by a linker when it creates a single monolithic executable file for the program.

Shared libraries can be statically linked, meaning that references to the library modules are resolved and the modules are allocated memory when the executable file is created. But often linking of shared libraries is postponed until they are loaded.

Most modern operating systems can have shared library files of the same format as the executable files. This offers two main advantages: first, it requires making only one loader for both of them, rather than two (having the single loader is considered well worth its added complexity). Secondly, it allows the executables also to be used as shared libraries, if they have a symbol table. Typical combined executable and shared library formats are ELF and Mach-O (both in Unix) and PE (Windows). In Windows, the concept was taken one step further, with even system resources such as fonts being bundled in the PE format. The same is true under OpenStep, where the universal "bundle" format is used for almost all system resources.

Read more about this topic:  Library (computing)

Famous quotes containing the word shared:

    We were that generation called “silent,” but we were silent neither, as some thought, because we shared the period’s official optimism nor, as others thought, because we feared its official repression. We were silent because the exhilaration of social action seemed to many of us just one more way of escaping the personal, of masking for a while that dread of the meaningless which was man’s fate.
    Joan Didion (b. 1935)