Position Independent Code

All dynamically loaded modules (and anything statically linked into them) must be compiled with Position Independent Code.

In g++ the option for position independent code is "-fPIC".

I know of no good test for position independence in a library. You may be able to observe the number of symbols that are output from nm. It seems like PIC code has a lot more extraneous symbols.

Zachary C. Miller
Last modified: Mon Sep 20 14:54:24 CDT 1999