This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Exceptions workaround for older systems that don't USE_COLLECT2
- To: law at cygnus dot com
- Subject: Re: Exceptions workaround for older systems that don't USE_COLLECT2
- From: "Melissa O'Neill" <oneill at cs dot sfu dot ca>
- Date: Tue, 15 Sep 1998 21:49:52 -0700
- cc: egcs at cygnus dot com, Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>, oneill at cs dot sfu dot ca
- References: <6045.905900885@hurl.cygnus.com>
I wrote:
>> I built egcs 1.1 last night with [...] configure's nextstep `use_collect2'
>> line changed from `no' to `yes' [...], and the results were disappointing.
>> While egcs builds okay, C++ is nonfunctional.
... and Jeff Law replied:
> __main should be in libgcc.a. What symbols appear in libgcc.a::_main.o?
libgcc.a(__main.o):
U ___DTOR_LIST__
00000000 T ___do_global_dtors
0000002c d _p.2
As you see, there is no __main. The culprit is config/nextstep.h, which
defines INIT_SECTION_ASM_OP and undefines INVOKE__main (since it still
expects that NeXT's linker will be handling constructors).
I'll post a patch for this on egcs-patches once I've built egcs with my
changes to nextstep.h (it looks like a pretty obvious fix).
Melissa.
P.S. The revised nextstep.h also fixes ASM_OUTPUT_CONSTRUCTOR,
ASM_OUTPUT_DESTRUCTOR and ASM_FILE_END -- it's pretty heavily based on
nextstep21.h (NEXTSTEP 2.1 did use collect2, BTW).