This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can you use PIC for shared library?


On Tue, Oct 19, 2004 at 09:37:14AM -0700, H. J. Lu wrote:
> On Mon, Oct 18, 2004 at 06:08:48PM -0700, H. J. Lu wrote:
> > I got
> > 
> > Running
> > /net/gnu/export/linux/src/binutils/binutils/ld/testsuite/ld-elf/exclude.exp
> > ...
> > /export/build/linux/binutils-debug/build-x86_64-linux/ld/../gas/as-new
> > -o tmpdir/exclude1.o
> > /net/gnu/export/linux/src/binutils/binutils/ld/testsuite/ld-elf/exclude1.s
> > /export/build/linux/binutils-debug/build-x86_64-linux/ld/../gas/as-new
> > -o tmpdir/exclude2.o
> > /net/gnu/export/linux/src/binutils/binutils/ld/testsuite/ld-elf/exclude2.s
> > /export/build/linux/binutils-debug/build-x86_64-linux/ld/ld-new  -o
> > tmpdir/exclude.so --shared tmpdir/exclude1.o -Ltmpdir -lexclude
> > /export/build/linux/binutils-debug/build-x86_64-linux/ld/ld-new:
> > tmpdir/exclude1.o: relocation R_X86_64_PC32 against `exclude_sym' can
> > not be used when making a shared object; recompile with -fPIC
> > /export/build/linux/binutils-debug/build-x86_64-linux/ld/ld-new: final
> > link failed: Bad value FAIL: ld link shared library
> > 
> > 
> 
> This works on ia32, ia64 and x86-64. I will check it in shortly.

Fine with me.  Does it work if you remove the " - include_sym" also? 
That should fix cris.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]