This is the mail archive of the
mailing list for the GCC project.
Re: libstdc++ bus errors
- To: Sean Callanan <sc843 at bard dot edu>
- Subject: Re: libstdc++ bus errors
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Tue, 13 Nov 2001 01:29:09 -0500 (EST)
- Cc: sparclinux at vger dot kernel dot org, ultralinux at vger dot kernel dot org, gcc at gcc dot gnu dot org
On Mon, 12 Nov 2001, Sean Callanan wrote:
> I am currently rebuilding my system from scratch (using the instructions at
> www.linuxfromscratch.org) 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";
> 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 ld.so cannot fix because unaligned stores cause a trap on
Upgrading binutils to 2.11.2 doesn't solve the problem, because ld.so
doesn't understand R_SPARC_UA32 relocations:
./a.out: error while loading shared libraries: /home/jsturm/junk.so:
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