This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Solaris-- relocation against external symbol
- To: kan at egr dot msu dot edu
- Subject: Re: Solaris-- relocation against external symbol
- From: Ian Lance Taylor <ian at cygnus dot com>
- Date: Mon, 10 Aug 1998 17:10:48 -0400
- CC: egcs-bugs at cygnus dot com
From: kan@egr.msu.edu (Yao-Chiang Kan)
Date: Wed, 5 Aug 1998 12:25:23 -0400 (EDT)
I installed the binutils-2.9.1 on our Solaris 2.51 system
and the relocation error still happen. So I renamed the /usr/ccs/bin/ld
and linked the new ld to /usr/ccs/bin/ld. Then the following error
poped on the screen.
===
g++ array.o -o array -L../lib -lblitz -lm
/opt2/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.52/libgcc.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
===
Any suggestion?
I saw a similar problem recently. It arose when using the Solaris
native assembler with -fpic (or -fPIC) and using the GNU linker to
produce a shared library. The easy workaround is to use the GNU
assembler instead.
Ian