Use nm to see which functions are included in an object file, library or executable program(if compiled with symbols).[root@localhost tmp]# nm program.o U exit00000000 T main U prog1[root@localhost tmp]# cat ../program.c#include "lib.h"int main (){ prog1("1000000");exit (0);}

Probem with Static libraries: when many running processes need to use the same function (provided by static lib),the system ends up with many copies of the same code/functions in memory.

Shared Library solves this problem. When a program uses a shred lib, it doesn't contain the function code butit references to shared code that will be available at run time. When the resulting program is loaded into memory to be executed, the function references are resolved and calls are made to the shared library, which willbe loaded into the memory if needed.

In this way, the system can just have a single copy of a shared library to be used by many applications at once.An additional benefit is that the shared library can be updated independently of the programs that rely on it because symbolic links from the file /lib/libc.so.6 to the actual library revision libc-2.3.4.so is used.