Solaris-- relocation against external symbol
Ian Lance Taylor
ian@cygnus.com
Mon Aug 10 14:10:00 GMT 1998
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
More information about the Gcc-bugs
mailing list