From owner-freebsd-current Tue Oct 29 9:18:38 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 E011137B401 for ; Tue, 29 Oct 2002 09:18:36 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 683B243E4A for ; Tue, 29 Oct 2002 09:18:36 -0800 (PST) (envelope-from eischen@pcnet1.pcnet.com) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.3/8.12.1) with ESMTP id g9THIQEk009030; Tue, 29 Oct 2002 12:18:26 -0500 (EST) Date: Tue, 29 Oct 2002 12:18:26 -0500 (EST) From: Daniel Eischen To: John Polstra Cc: current@FreeBSD.ORG, dfr@nlsystems.com Subject: Re: gnome on current In-Reply-To: <200210291647.g9TGlVM5049992@vashon.polstra.com> Message-ID: 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 Tue, 29 Oct 2002, John Polstra wrote: > In article <20021029141208.C97929-100000@herring.nlsystems.com>, > Doug Rabson wrote: > > On Tue, 29 Oct 2002, John Polstra wrote: > > > I think it would work if the symbol were defined strongly in libc_r. > > > > I think so too. I was trying to work out why this wasn't how things were > > done already. FWIW, linux's libpthread appears to be defining the > > pthread_* symbols strongly. > > I think the weak symbols have something to do with support for thread > cancellation. I didn't pay much attention at the time, so I don't > know the details. Here's the relevant commit message, I think (this > one taken from lib/libc_r/uthread/uthread_pause.c): I wasn't paying attention to this thread until I got a glance at this message... FYI, we do the same thing as Solaris: bash-2.05$ uname -rvs SunOS 5.8 Generic_108528-12 bash-2.05$ nm /usr/lib/libpthread.so.1 | grep pthread_mutex_ 0000000000003d28 T _pthread_mutex_attr_gettype 0000000000003d20 T _pthread_mutex_attr_settype 0000000000003c38 T _pthread_mutex_consistent_np 0000000000003c78 T _pthread_mutex_destroy 0000000000003ca0 T _pthread_mutex_getprioceiling 0000000000003c70 T _pthread_mutex_init 0000000000003c80 T _pthread_mutex_lock 0000000000003c98 T _pthread_mutex_setprioceiling 0000000000003c90 T _pthread_mutex_trylock 0000000000003c88 T _pthread_mutex_unlock 0000000000003d28 W pthread_mutex_attr_gettype 0000000000003d20 W pthread_mutex_attr_settype 0000000000003c38 W pthread_mutex_consistent_np 0000000000003c78 W pthread_mutex_destroy 0000000000003ca0 W pthread_mutex_getprioceiling 0000000000003c70 W pthread_mutex_init 0000000000003c80 W pthread_mutex_lock 0000000000003c98 W pthread_mutex_setprioceiling 0000000000003c90 W pthread_mutex_trylock 0000000000003c88 W pthread_mutex_unlock All the pthread_* symbols are weak with the underscore versions being the strong ones. The same thing with libthread (_thr_* are the strong symbols, thr_* are weak). Why does libgcc have no problem? Is it because it uses weak references to the thread routines and avoids calling them until they are non-null? -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message