From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: law@cygnus.com Cc: martin@mira.isdn.cs.tu-berlin.de, egcs@egcs.cygnus.com Subject: Re: multiple definitions of 'xxx keyed to...' in egcs-1.1.1 Date: Sun, 28 Feb 1999 22:53:00 -0000 Message-ID: References: <20471.919147770@hurl.cygnus.com> X-SW-Source: 1999-02n/msg00712.html Message-ID: <19990228225300.uZvWDkXsGFwmmcmyLg2T4hT8icKPHOEoOYi8g4gRlnA@z> > > > > 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)