Messages in this thread | ![/](/images/icornerl.gif) | | Date | Wed, 17 Dec 2003 18:46:54 +0000 | From | Thorsten Kranzkowski <> | Subject | Re: pam_debug.o: gp-relative relocation against dynamic symbol _pam_token_returns |
| |
On Tue, Dec 16, 2003 at 10:50:13PM -0600, Will L G wrote: > When ever I attempt to compile Linux-Pam, I receive the following error > immediately after running 'make': > > /usr/bin/ld: dynamic/pam_debug.o: gp-relative relocation against dynamic > symbol _pam_token_returns
Always use '-fpic' in CFLAGS when compiling for shared objects (.so) Otherwise (as in your case) the compiler is allowed to emit machine code that may not work in shared objects. When I was hit by this error, the offending library was istself linked to another, static library. This isn't allowed either. IIRC my fix was compiling that .a library with -fpic :)
Thorsten
-- | Thorsten Kranzkowski Internet: dl8bcu@dl8bcu.de | | Mobile: ++49 170 1876134 Snail: Kiebitzstr. 14, 49324 Melle, Germany | | Ampr: dl8bcu@db0lj.#rpl.deu.eu, dl8bcu@marvin.dl8bcu.ampr.org [44.130.8.19] | - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |