From owner-freebsd-arch@FreeBSD.ORG Wed Mar 26 14:22:01 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAD4937B404 for ; Wed, 26 Mar 2003 14:22:01 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29C0143FB1 for ; Wed, 26 Mar 2003 14:22:01 -0800 (PST) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h2QMLoBg004177; Wed, 26 Mar 2003 17:21:50 -0500 (EST) Received: from localhost (eischen@localhost)h2QMLo1n004174; Wed, 26 Mar 2003 17:21:50 -0500 (EST) Date: Wed, 26 Mar 2003 17:21:50 -0500 (EST) From: Daniel Eischen To: "M. Warner Losh" In-Reply-To: <20030326.150152.125002089.imp@bsdimp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-25.4 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES,USER_AGENT_PINE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: arch@freebsd.org cc: kse@elischer.org Subject: Re: Not providing static libraries (libkse/libpthread) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2003 22:22:02 -0000 On Wed, 26 Mar 2003, M. Warner Losh wrote: > In message: <20030326214421.GF11320@dhcp01.pn.xcllnt.net> > Marcel Moolenaar 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