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 words shared and/or libraries:

    [The pleasures of writing] correspond exactly to the pleasures of reading, the bliss, the felicity of a phrase is shared by writer and reader: by the satisfied writer and the grateful reader, or—which is the same thing—by the artist grateful to the unknown force in his mind that has suggested a combination of images and by the artistic reader whom his combination satisfies.
    Vladimir Nabokov (1899–1977)

    riding flatcars to Fresno,
    Across the whole country
    Steep towns, flat towns, even New York,
    And oceans and Europe & libraries & galleries
    And the factories they make rubbers in
    Gary Snyder (b. 1930)