From owner-freebsd-current@FreeBSD.ORG Sun Feb 3 15:59:48 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3914416A41B for ; Sun, 3 Feb 2008 15:59:48 +0000 (UTC) (envelope-from peter@wemm.org) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.184]) by mx1.freebsd.org (Postfix) with ESMTP id D12B213C442 for ; Sun, 3 Feb 2008 15:59:47 +0000 (UTC) (envelope-from peter@wemm.org) Received: by fk-out-0910.google.com with SMTP id b27so2025221fka.11 for ; Sun, 03 Feb 2008 07:59:46 -0800 (PST) Received: by 10.82.161.19 with SMTP id j19mr11062229bue.25.1202054385882; Sun, 03 Feb 2008 07:59:45 -0800 (PST) Received: by 10.82.182.2 with HTTP; Sun, 3 Feb 2008 07:59:45 -0800 (PST) Message-ID: Date: Sun, 3 Feb 2008 08:59:45 -0700 From: "Peter Wemm" To: "=?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?=" In-Reply-To: <861w7um5o5.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <861w7um5o5.fsf@ds4.des.no> Cc: threads@freebsd.org, current@freebsd.org Subject: Re: Symbol versioning errors in libthr X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 03 Feb 2008 15:59:48 -0000 On Feb 3, 2008 8:16 AM, Dag-Erling Sm=F8rgrav wrote: > Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's symbol map: > > --- pthread.map 13 May 2007 14:12:39 -0000 1.18 > +++ pthread.map 20 Dec 2007 04:32:28 -0000 1.21 > @@ -84,9 +84,13 @@ > pthread_multi_np; > pthread_mutex_destroy; > pthread_mutex_getprioceiling; > + pthread_mutex_getspinloops_np; > + pthread_mutex_getyieldloops_np; > pthread_mutex_init; > pthread_mutex_lock; > pthread_mutex_setprioceiling; > + pthread_mutex_setspinloops_np; > + pthread_mutex_setyieldloops_np; > pthread_mutex_timedlock; > pthread_mutex_trylock; > pthread_mutex_unlock; > > These functions are all in FBSD_1.0, but they were introduced after the > branch and never MFCed, so if I understand how we've implemented symbol > versioning, they should be in FBSD_1.1. > > Unless someone argues credibly for keeping them in FBSD_1.0, I will move > them to FBSD_1.1 in a few days. > > DES I'm not sure I see the point in that. Consider the not-moving-to-1.1 case. If somebody takes an 8.0 binary and runs it on 7.x, then they'll get a 'symbol not found' error. On the other hand, if they're moved and somebody tries the same thing, then they still get the same kind of 'symbol not found' error but with just one character different. The point of symbol versioning is to allow incompatible changes. eg: to have a FBSD_1.0 version of pthread_mutex_getspinloops_np() *AND* a FBSD_1.1 version of pthread_mutex_getspinloops_np() in the library at the same time. The 1.0 instance would presumably be an API/ABI conversion wrapper around the newer functions. -Peter --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5