Date: Tue, 29 Oct 2002 12:18:26 -0500 (EST) From: Daniel Eischen <eischen@pcnet1.pcnet.com> To: John Polstra <jdp@polstra.com> Cc: current@FreeBSD.ORG, dfr@nlsystems.com Subject: Re: gnome on current Message-ID: <Pine.GSO.4.10.10210291211090.8125-100000@pcnet1.pcnet.com> In-Reply-To: <200210291647.g9TGlVM5049992@vashon.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 29 Oct 2002, John Polstra wrote: > In article <20021029141208.C97929-100000@herring.nlsystems.com>, > Doug Rabson <dfr@nlsystems.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10210291211090.8125-100000>