This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: multiple definitions of 'xxx keyed to...' in egcs-1.1.1
- To: law at cygnus dot com
- Subject: Re: multiple definitions of 'xxx keyed to...' in egcs-1.1.1
- From: hjl at lucon dot org (H.J. Lu)
- Date: Tue, 16 Feb 1999 06:57:22 -0800 (PST)
- Cc: martin at mira dot isdn dot cs dot tu-berlin dot de, egcs at egcs dot cygnus dot com
>
>
>
> In message <199902132010.VAA04139@mira.isdn.cs.tu-berlin.de>you write:
> > I think the minimal solution is to make initializer symbols static on
> > ELF systems. HJ has a patch, although I haven't reviewed it to see
> > whether it does what it promises to do.
> I'm not even sure that is correct.
>
> At one time it was possible to build a .o and suck it into your address
> space via dynamic loader calls. And if the .o has static ctors/dtors, the
> application is responsible for firing them -- and to do so it must be able
> to query the dynamic loader for predictable symbol names.
>
Now you are talking non-standard stuff here. I can say it is up to
the application to figure out those .ctor/.dtor sections and call
those .ctor/.dtor sections at the appropriate time. All the information
is there. The ELF linker uses it. So can the application.
--
H.J. Lu (hjl@gnu.org)