This is the mail archive of the mailing list for the GCC project.

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

Re: libstdc++ bus errors

On Mon, 12 Nov 2001, Sean Callanan wrote:
> I am currently rebuilding my system from scratch (using the instructions at 
> with GCC 3.0.2 and glibc 2.2.4.
> I have simply compiled GCC 3.0.2 for sparc-linux (32-bit) with dynamic 
> linking against the new libc. However, even a test program:
> --
> #include <iostream.h>
> void main()
> {
> 	cout << "Hello C++!\n";
> 	exit(0);
> }
> --
> has a bus error. Are there known issues with sparc and libstdc++ 3.0.2? 
> (Incidentally, I try to run the library itself, and get a segmentation 
> fault, but I suspect that isn't such a big issue since the c++ library on 
> my original SuSE install does the exact same thing.

I've seen this too, using slackware-current on sparc.  The cause is
twofold: GNU ld incorrectly generates a R_SPARC_32 reloc for an unaligned
word, which cannot fix because unaligned stores cause a trap on

Upgrading binutils to 2.11.2 doesn't solve the problem, because
doesn't understand R_SPARC_UA32 relocations:

./a.out: error while loading shared libraries: /home/jsturm/
unexpected reloc type 0x17

Before I tackle it, anyone know if there is a fixed libc for sparc-linux?

(Meanwhile, configuring gcc with --enable-sjlj-exceptions might be an
effective workaround.)


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