Sun May 16 13:03:44 GMT 2004 Statically linked programs vs. Dynamic
Most prorams of any complexity make use of libraries to obtain capabilities not found in the base language. There are two ways to use routines from libraries: link them in statically, which means the code from the library is included in the binary produced, or use dynamic linking, where the binary simply contains a pointer to the needed routine, which will be loaded by the OS as needed.
The disadvantage of dynamic linking is that obtaining the binary you want may not be enough: your machine may not have a particular library the binary needs. Worse, you sometimes get into a mess where that library in turn requires some other library or library. It can sometimes be very annoying and frustrating to track down all the dependencies.
However, an important benefit is that libraries can be updated to fix bugs or security problems and the binaries that use them are immediately using the fixed code. The original intent (to save disk and memory usage) is of very little importance today, but the unanticipated security benefit is extremely important.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2012-06-27 Tony Lawrence