Position Independent Code
When you compile a shared library (with
-fPIC, in the case of
gcc), you are specifying that you want the compiler to generate position independent code.
Position independent code never uses straightforward machine addressing modes to access global variables, static variables, or non-static functions. Instead, position independent code accesses these kinds of data indirectly.
PLTs and the GOT