Content deleted Content added
extlinks |
dynamic loading |
||
Line 17:
== Dynamic linking ==
'''Dynamic linking''' is linking in which a library is loaded by the [[operating system]]'s [[Loader (computing)|loader]] separately from the executable file at [[loadtime]] or [[runtime]]. The result is called a '''dynamically linked library'''.
Most operating systems resolve external dependencies like libraries (called ''imports'') as part of the loading process.
Line 38:
Dynamic linking libraries date back to at least MTS (the Michigan Terminal System), built in the late 60s. ("A History of MTS", ''Information Technology Digest'', Vol. 5, No. 5)
==
*[[GNU]]/[[Linux]], [[Solaris Operating Environment|Solaris]] and [[BSD]] variants: <code>libfoo.so</code> files in folders like <code>/lib</code>, <code>/usr/lib</code> or <code>/usr/local/lib</code> are dynamically linked libraries. The filenames always start with <code>lib</code>, and end with <code>.so</code> (shared object), with an optional interface number, for example <code>libfoo.so.2</code> is the second interface revision of the library <code>libfoo</code>.▼
Additionally, a library may be loaded dynamically ''during'' the execution of a program, as opposed to when the program is loaded to main memory or started from main memory. The loading if the library is thus delayed until it is needed, and if it is never needed, it is never loaded. Such a library is refered to as a '''dynamically loaded library''' (DL).
This form of library is typically used for [[plug-in]] modules and [[interpreters]] needing to load certain functionality on demand.
An alternative to dynamic loading is to use some kind of [[software componentry]] or [[remote procedure call]].
==Naming==
▲*[[GNU]]/[[Linux]], [[Solaris Operating Environment|Solaris]] and [[BSD]] variants: <code>libfoo.so</code> files in folders like <code>/lib</code>, <code>/usr/lib</code> or <code>/usr/local/lib</code> are dynamically linked libraries. The filenames always start with <code>lib</code>, and end with <code>.so</code> (shared object), with an optional interface number, for example <code>libfoo.so.2</code> is the second interface revision of the library <code>libfoo</code>. Dynamically ''loaded'' libraries are placed in <code>/usr/libexec</code> and similar directories.
*[[MacOS X]] and upwards: libraries are named <code>libfoo.dylib</code>, with an optional interface number, such as <code>libfoo.2.dylib</code>.
*[[Microsoft Windows]]: <code>*.DLL</code> files are dynamically linked libraries. The interface revisions are encoded in the files, or abstracted away using [[component object model|COM-object]] interfaces.
|