APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Statically linked programs vs. Dynamic


© May 2004 Tony Lawrence

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.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Statically linked programs vs. Dynamic


Inexpensive and informative Apple related e-books:

Take Control of OS X Server

Take Control of iCloud

Take Control of High Sierra

Photos: A Take Control Crash Course

Take Control of Pages




More Articles by © Tony Lawrence


Another disadvantage of using dynamically linked libraries is the extra processing overhead involved to load them during runtime. Fortunately, the additional processing is not apparent in most cases due to the performance level of today's hardware.

--BigDumbDinosaur




Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





Any inaccuracies in this index may be explained by the fact that it has been sorted with the help of a computer. (Donald Knuth)




Linux posts

Troubleshooting posts


This post tagged:

Blog



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com