This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: __CTOR_LIST__ brokeness for NetBSD a.out (egcs-2.93.21 19990513)
- To: cato at df dot lth dot se
- Subject: Re: __CTOR_LIST__ brokeness for NetBSD a.out (egcs-2.93.21 19990513)
- From: Marc Espie <espie at quatramaran dot ens dot fr>
- Date: Thu, 13 May 1999 23:04:53 +0200
- Cc: egcs-bugs at egcs dot cygnus dot com
In article <Pine.LNX.4.05-df.9905132134340.2555-100000@bartlet.df.lth.se> you write:
>I'm getting lots of testsuite failures on my NetBSD machines (i386, arm32
>and sparc) from the change
>
> 1999-03-24 Jim Blandy <jimb@zwingli.cygnus.com>
>
> * libgcc2.c (__CTOR_LIST__, __DTOR_LIST__): Initialize on all
> platforms.
>
>What is happening is that the ancient ld used on NetBSD a.out platforms
>chokes on enties from .stabs lines of the type
>
> .stabs "___CTOR_LIST__",22,0,0,__GLOBAL_$I$noopGCOV
>
>with the message
>
> ld: internal error: allocated set symbol space (3) doesn't match actual (1)
We've got the same problem on OpenBSD.
This was particularly visible when going from 990418 to 990502, trying to
build groff.
This is at least also partially linked to some on-going optimizations of
static ctors/dtors (See Mark Mitchell's 1999-04-30 change to
C++, for instance).
Anyway, we do have a work-around, which is to set
use_collect2=yes on a.out platforms...
This is not perfect, but at least gas and ld no longer have any chance to get
confused with those stabs.
This led to some collect2 tweaks, since it did not collect dynamic libraries
correctly --- see
http://egcs.cygnus.com/ml/egcs-patches/1999-05/msg00235.html
for details.
A more permanent solution is of course welcome, but in the mean-time, this
appears to fix things fine... at least from where I stand...