Search Contact information
University of Cambridge Home Department of Engineering
University of Cambridge >  Engineering Department >  computing help

linux shared libraries

Note: Nearly all of this is from http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

Shared libraries are collections of code that can be shared by programs. Unlike static (aka archive) libraries, they're not part of the compiled program - they're loaded in at the start of run-time if they're not already being used. You don't need to worry about them unless you're a system manager or applications writer.

Names

Every shared library has

Creating shared libraries

Shared libraries at run-time

On Linux, starting up an ELF binary executable automatically causes the program loader /lib/ld-linux.so.X to be loaded and run, which in turn, finds and loads all other shared libraries used by the program. The list of directories to be searched is stored in the file /etc/ld.so.conf (our file lists about 17 directories).

Note that libc.so.N is the C library, which is used by just about all programs.

libtool

Libtool is a utility that hides the complexity of using shared and static libraries. The *.la files in library directories are produced by it.

© Cambridge University Engineering Dept
Information provided by Tim Love (tpl)
Last updated: July 2008