From owner-freebsd-current@FreeBSD.ORG Thu Apr 1 07:27:24 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 150C616A4CE; Thu, 1 Apr 2004 07:27:24 -0800 (PST) Received: from postman.arcor.de (postman2.arcor-online.net [151.189.0.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7883843D2F; Thu, 1 Apr 2004 07:27:23 -0800 (PST) (envelope-from eikemeier@fillmore-labs.com) Received: from fillmore.dyndns.org (port-212-202-49-130.reverse.qsc.de [212.202.49.130]) (authenticated bits=0)i31FRLOj007800 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 1 Apr 2004 17:27:22 +0200 (MEST) Received: from [172.16.0.2] (helo=fillmore-labs.com) by fillmore.dyndns.org with esmtp (Exim 4.31; FreeBSD) id 1B945y-0004SI-7p; Thu, 01 Apr 2004 17:27:21 +0200 Message-ID: <406C34CA.1070707@fillmore-labs.com> Date: Thu, 01 Apr 2004 17:27:06 +0200 From: Oliver Eikemeier Organization: Fillmore Labs GmbH - http://www.fillmore-labs.com/ MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: "Jacques A. Vidrine" cc: freebsd-current@FreeBSD.org cc: Sean McNeil Subject: Re: nss_ldap broken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2004 15:27:24 -0000 Daniel Eischen wrote: > On Thu, 1 Apr 2004, Jacques A. Vidrine wrote: > > [...] >>It seems to me we need one of a few things to happen to our threads >>implementation*s*: >> >> (a) pthread.h provides all the magic needed to make pthread_* >> symbols weak, i.e. transparently providing the functionality of >> the `libgcc hack' which Dan says would avoid the problem. > > > I don't think that will work; it'll break applications/libraries > not expecting those functions to be NULL. > > >> (b) ``somehow'' arrange for the unloading of a thread library to >> fixup the pthread stubs `back to normal'. er, that sounds like >> a load of work and dangerous to boot. >> >> (c) teach rtld to treat thread libraries specially: ignore them during >> dlopen even if they are specified in DT_NEEDED. perhaps we could >> add some info to the ELF headers of our thread libraries that rtld >> could use to implement this. hacky. > > > I think the best way is to avoid having shared libraries needlessly linked to > a threads library. I don't think this is really an option, since you expect too much testing from ports maintainers here. It may be difficult to tweak the ports Makefiles if the port has shared libraries and applications, and most maintainers won't notice this anyway. For example Berkeley DB is linked against libpthread, so I had to be careful what OpenLDAP parts I link to Berkeley DB. You can build nice and complex chains here. -Oliver