This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
BUG: Missing Global constructors on mips-sgi-irix5.3 (solved)
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: BUG: Missing Global constructors on mips-sgi-irix5.3 (solved)
- From: Achim Herwig <achimh at ccc dot chemie dot uni-erlangen dot de>
- Date: Fri, 25 Jun 1999 17:48:42 +0200 (MEST)
Hi there,
I don't know if the term BUG is correct or "insufficient documentation" is
more to the point.
In the "Host/Target specific installation notes for egcs" it says that
one has to compile his/her own gas for IRIX 5.3 . Well, so I installed
gas-970915 before egcs-1.1.2. Naturally, it brought its own nm with it.
(It now occurs to me that this version of gas is quite old. As I solved the
problem I don't want to check with an up-to-date version. I'm still
wondering where I found and downloaded this one.)
The problem shows when you have global constructors in your code. collect2
runs ld once, looks for needed constructors (via nm), generates and compiles
these and links again. So much for theory.
In practice, the nm from gas-970915 was used. It was unable to find any
symbol in the intermediate binary and so collect2 assumed everything was
already done. As you can think this resulted in segfaults.
The solution lies either in (a) correcting collect2 to use the OSes nm
instead of a gnu one (b) telling people to rm or mv the gnu
nm after installation (it's there twice: in $PREFIX/bin and in
$PREFIX/mips-sgi-irix5.3/bin) or (c) making nm understand the binary format
on IRIX5.3.
I hope this helps you. I'm otherwise quite satisfied with egcs and think you
are doing a great job with it. It's my primary development tool.
Bye,
Achim.
--
Achim Herwig | Achim.Herwig@ccc.chemie.uni-erlangen.de, achim@thc.mayn.de
+49 9131 856574 | http://www2.ccc.uni-erlangen.de/people/Achim_Herwig/
PGP-Fingerprint16 = 17 9A 42 C5 E8 72 A8 3F 96 27 7B A0 48 0B 88 F3