From owner-freebsd-arch@FreeBSD.ORG Wed Mar 26 13:44:54 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 D370237B404 for ; Wed, 26 Mar 2003 13:44:54 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id E026A43F85 for ; Wed, 26 Mar 2003 13:44:53 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.8/8.12.8) with ESMTP id h2QLiLKu025908; Wed, 26 Mar 2003 13:44:22 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.8/8.12.8) with ESMTP id h2QLiLBm011898; Wed, 26 Mar 2003 13:44:21 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.8/8.12.8/Submit) id h2QLiLxM011897; Wed, 26 Mar 2003 13:44:21 -0800 (PST) Date: Wed, 26 Mar 2003 13:44:21 -0800 From: Marcel Moolenaar To: Daniel Eischen Message-ID: <20030326214421.GF11320@dhcp01.pn.xcllnt.net> References: <200303262030.h2QKU6A7089578@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-31.9 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MUTT 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 cc: Warner Losh 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 21:44:56 -0000 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). -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net