This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: multiple definitions of 'xxx keyed to...' in egcs-1.1.1
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: multiple definitions of 'xxx keyed to...' in egcs-1.1.1
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Sun, 21 Feb 1999 16:14:25 -0700
- cc: martin at mira dot isdn dot cs dot tu-berlin dot de (Martin v. Loewis), egcs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <m10EMUB-000392C@ocean.lucon.org>you write:
> >
> > > * decl2.c (start_objects): Make file scope constructors and
> > > destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
> > > ASM_OUTPUT_DESTRUCTOR are defined.
> >
> > This is incorrect. Please look at config/aoutos.h. It always defines
> > ASM_OUTPUT_CONSTRUCTOR, but then decides, at runtime, whether to use
> > GNU binutils. If GNU ld is not used, no __CTOR_LIST__ is constructed,
> > and collect2 would have to find constructors. Now that you made them
> > static, this would fail.
> >
>
> That is bogus. Please take a look at how ASM_OUTPUT_CONSTRUCTOR is
> used. If ASM_OUTPUT_CONSTRUCTOR is not defined, egcs will check whether
> to use the gnu linker. Why does config/aoutos.h to have duplicate
> what is in the egcs backend?
I think you missed the most critical point behind Martin's objection.
Your change, as-is will break a port.
You need to address this problem in some manner (I think there have been
suggestions posted to the list).
There's still the issue of breaking NT, VMS and a variety of COFF systems
too with your patch.
jeff