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 cot we shared is almost a prison
    where I can’t say buttercup, bobolink,
    sugarduck, pumpkin, love ribbon, locket,
    valentine, summergirl, funnygirl and all
    those nonsense things one says in bed.
    Anne Sexton (1928–1974)

    To me, nothing can be more important than giving children books, It’s better to be giving books to children than drug treatment to them when they’re 15 years old. Did it ever occur to anyone that if you put nice libraries in public schools you wouldn’t have to put them in prisons?
    Fran Lebowitz (20th century)