* libstdc++ bus errors
@ 2001-11-13 4:39 Sean Callanan
2001-11-13 5:20 ` Jeff Sturm
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Sean Callanan @ 2001-11-13 4:39 UTC (permalink / raw)
To: ultralinux
(Sorry if you've already seen this; I'm having SMTP server problems)
Dear mailing list:
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";
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.
Incidentally, I have the C++ library for 32-bit in /usr/lib, and the C++
library for 64-bit in /usr/lib64. There should be no issues with libs
conflicting.
Sincerely,
Sean Callanan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libstdc++ bus errors
2001-11-13 4:39 libstdc++ bus errors Sean Callanan
@ 2001-11-13 5:20 ` Jeff Sturm
2001-11-13 5:33 ` David S. Miller
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Sturm @ 2001-11-13 5:20 UTC (permalink / raw)
To: ultralinux
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";
> 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 ld.so cannot fix because unaligned stores cause a trap on
sparc.
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
effective workaround.)
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libstdc++ bus errors
2001-11-13 4:39 libstdc++ bus errors Sean Callanan
2001-11-13 5:20 ` Jeff Sturm
@ 2001-11-13 5:33 ` David S. Miller
2001-11-13 6:00 ` Jeff Sturm
2001-11-14 17:15 ` sc843
3 siblings, 0 replies; 5+ messages in thread
From: David S. Miller @ 2001-11-13 5:33 UTC (permalink / raw)
To: ultralinux
From: Jeff Sturm <jsturm@one-point.com>
Date: Tue, 13 Nov 2001 01:29:09 -0500 (EST)
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
Upgrade glibc, then binutils :-) Current glibc understands
the UA32 relocs properly.
Franks a lot,
David S. Miller
davem@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libstdc++ bus errors
2001-11-13 4:39 libstdc++ bus errors Sean Callanan
2001-11-13 5:20 ` Jeff Sturm
2001-11-13 5:33 ` David S. Miller
@ 2001-11-13 6:00 ` Jeff Sturm
2001-11-14 17:15 ` sc843
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Sturm @ 2001-11-13 6:00 UTC (permalink / raw)
To: ultralinux
On Mon, 12 Nov 2001, David S. Miller wrote:
>
> ./a.out: error while loading shared libraries: /home/jsturm/junk.so:
> unexpected reloc type 0x17
>
> Upgrade glibc, then binutils :-) Current glibc understands
> the UA32 relocs properly.
Ah yes, I found the requisite patch... thanks.
http://sources.redhat.com/ml/libc-alpha/2001-07/msg00021.html
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libstdc++ bus errors
2001-11-13 4:39 libstdc++ bus errors Sean Callanan
` (2 preceding siblings ...)
2001-11-13 6:00 ` Jeff Sturm
@ 2001-11-14 17:15 ` sc843
3 siblings, 0 replies; 5+ messages in thread
From: sc843 @ 2001-11-14 17:15 UTC (permalink / raw)
To: ultralinux
> > Upgrading binutils to 2.11.2 doesn't solve the problem, because ld.so
> > doesn't understand R_SPARC_UA32 relocations...
> Upgrade glibc, then binutils :-) Current glibc understands
> the UA32 relocs properly.
I don't think this is the sole cause of the problem. I have glibc 2.2.4, which
(according to my hand-checking) includes the fix for R_SPARC_UA32
mentioned in an earlier message:
> Ah yes, I found the requisite patch... thanks.
> http://sources.redhat.com/ml/libc-alpha/2001-07/msg00021.html
...but still C++ programs have bus errors.
Perhaps a related issue could be that I overrode the default behavior of
the 32->64 cross compiler to copy all the system headers into
$PREFIX/sparc64-linux/sys-includes
and instead symlinked that directory to
$PREFIX/include
I don't know what else the problem might be. Must I upgrade to a CVS
version of binutils? (I have 2.11)
Would it help if I build gdb and tried to figure out the source of the error
more precisely, or is this well-known?
Sincerely,
Sean Callanan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-11-14 17:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-13 4:39 libstdc++ bus errors Sean Callanan
2001-11-13 5:20 ` Jeff Sturm
2001-11-13 5:33 ` David S. Miller
2001-11-13 6:00 ` Jeff Sturm
2001-11-14 17:15 ` sc843
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox