Position-independent code (PIC) is code that can execute regardless of its absolute address (i.e. by using relative addressing). PIC is used for shared libraries, allowing library code to be located anywhere in memory.
Static Library
Static libraries are essentially a set of object files that are copied into a single file. When static libraries are linked into a program, their contents are copied into the program.
Shared Library
A shared library or shared object is a file that is intended to be shared by multiple programs. Symbols used by a program are loaded from shared libraries into memory at load time or runtime.
