public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Relocation error under Solaris 2.95.2 and GCC 2.95.2
@ 2001-09-26  8:05 Jacques.Herry
  0 siblings, 0 replies; only message in thread
From: Jacques.Herry @ 2001-09-26  8:05 UTC (permalink / raw)
  To: gcc-help

Hello All,

When linking to create a dynamic library, I get the following error:
ld: warning: relocation error: R_SPARC_32: file test2.o: symbol
<unknown>:
external symbolic relocation against non-allocatable section .stab;
cannot be processed at runtime: relocation ignored

The command line used to link is:
g++ -shared -fPIC -o test.so test1.o test2.o

The command line used to compile is:
g++ -g -mcpu=v8 -Wall -pedantic -fPIC -c -o test1.o test1.cc
When compiling with the option -O2 and the same link command, the error
disappears.
When compiling and linking without the options -fPIC and -shared (static
library), the error disappears.

The used configuration is the following:
Solaris 2.5.1 up-to-date concerning the patches
gcc 2.95.2
SUN's assembler and linker

I read on the net to use the Gnu assembler and linker. Is it the solution?
If yes, which version of the assembler and linker should I use with the
mentioned configuration?
Do I need to recompile GCC with these new tools? (If yes, which options?)
How configure GCC to use the new tools?
Do I need to recompile the libraries? What's about the system libraries?

Thanks,
Jacques





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-09-26  8:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-26  8:05 Relocation error under Solaris 2.95.2 and GCC 2.95.2 Jacques.Herry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).