Date: Wed, 26 Mar 2003 17:21:50 -0500 (EST) From: Daniel Eischen <eischen@pcnet1.pcnet.com> To: "M. Warner Losh" <imp@bsdimp.com> Cc: kse@elischer.org Subject: Re: Not providing static libraries (libkse/libpthread) Message-ID: <Pine.GSO.4.10.10303261718210.3735-100000@pcnet1.pcnet.com> In-Reply-To: <20030326.150152.125002089.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 26 Mar 2003, M. Warner Losh wrote: > In message: <20030326214421.GF11320@dhcp01.pn.xcllnt.net> > Marcel Moolenaar <marcel@xcllnt.net> writes: > : On Wed, Mar 26, 2003 at 04:04:42PM -0500, Daniel Eischen wrote: > : > > : > Also, in a lot of functions, there are: > : > > : > if (_thread_initial == NULL) > : > _thread_init(); > : > > : > I'd like to be able to get rid of these eventually and perhaps have > : > some magical way of getting it called automatically when the library > : > is loaded. > : > : You may be able to piggyback on the C++ static object initialization > : by utilizing _init() and _fini(). I don't think archive is different > : from shared in that respect for C (ie they both don't have what _init() > : provides and have _fini() in terms for atexit()). But it works in both > : cases if you add some C++ related magic (See also the .init and .fini > : ELF sections). > > Yes. I was going to make that same point. C++ static object init > always happens, static or dynamic. And has since FreeBSD has > supported ELF... OK, since there seems to be some objections, I'll withdraw the proposition. Other reasons may develop later on, but I'll shelve the idea for now. Thanks for everyone's input :) -- Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10303261718210.3735-100000>