From owner-freebsd-current Thu Oct 31 1: 7:39 2002 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 1F95337B401 for ; Thu, 31 Oct 2002 01:07:38 -0800 (PST) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F03043E42 for ; Thu, 31 Oct 2002 01:07:37 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from mailgate.nlsystems.com ([62.49.251.130] helo=herring.nlsystems.com) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 187BIe-000959-0U; Thu, 31 Oct 2002 09:07:36 +0000 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.12.6/8.12.4) with ESMTP id g9V97Zj0035512; Thu, 31 Oct 2002 09:07:35 GMT (envelope-from dfr@nlsystems.com) Date: Thu, 31 Oct 2002 09:07:35 +0000 (GMT) From: Doug Rabson To: ak03@gte.com Cc: Daniel Eischen , , Subject: Re: [PATCH: libc]Re: gnome on current In-Reply-To: <20021031000501.3e20a6a6.kabaev@bellatlantic.net> Message-ID: <20021031090443.T22480-100000@herring.nlsystems.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 31 Oct 2002, Alexander Kabaev wrote: > On Wed, 30 Oct 2002 22:25:12 -0500 (EST) > Daniel Eischen wrote: > > > > If last weak will win, the normal case when Xthrstub is loaded > > > _after_ libc_r will break. The only way to really fix this is to > > > export pthread_ symbols as strong in libc_r. Exporting them as weak > > > sounds like is a mistake which should be fixed. > > > > I disagree. See Solaris 6, 7, 8 & 9 for an example. > > > Cool. Then let's be consistent and follow Solaris all the way. Libc on > Solaris provides full set of pthread_? functions which in turn call > weakly defined _pthread_?? counterparts. libpthread in turn provides > strong definitions for _pthread_??. > > Since in absolute majority of cases libc is the first library searched > for symbols, all pthread references will be bound to it and failure > described by Doug will not happen. > > Any library providing strong pthread_ definitions will be able to > override ones provided by the system. Our libc is quite different. We define a (weak) set of _pthread_* symbols and libc_r defines a set of strong _pthread_* symbols and a set of weak pthread_* aliases for them. It sounds like libc should define weak _pthread_*, and weak pthread_* aliases for them. Libc_r should define strong _pthread_* symbols and libc's aliases will then resolve to them. That ought to work quite well in this situation and should satisfy everyone. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message