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
I know of no good test for position independence in a
library. You may be able to observe the number of symbols that are
nm. It seems like PIC code has a lot more