This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Compiling a shared lib problems
- From: John Graham <johngavingraham at googlemail dot com>
- To: Marcus Clyne <bu dot eugaia at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 12 Feb 2010 09:36:55 +0000
- Subject: Re: Compiling a shared lib problems
- References: <4B74F2B3.6070805@gmail.com>
> shared.o: relocation R_X86_64_PC32 against undefined symbol `my_func' can
> not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: ld returned 1 exit status
Have you tried adding -fPIC when you link?
John G