Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Feb 2008 12:06:28 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Peter Wemm <peter@wemm.org>
Cc:        =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no>, current@freebsd.org, threads@freebsd.org
Subject:   Re: Symbol versioning errors in libthr
Message-ID:  <Pine.GSO.4.64.0802031201040.8686@sea.ntplx.net>
In-Reply-To: <e7db6d980802030759x6db9bf1dq8992542bd8d2e017@mail.gmail.com>
References:  <861w7um5o5.fsf@ds4.des.no> <e7db6d980802030759x6db9bf1dq8992542bd8d2e017@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-684387517-1202058388=:8686
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Sun, 3 Feb 2008, Peter Wemm wrote:

> On Feb 3, 2008 8:16 AM, Dag-Erling Sm=F8rgrav <des@des.no> 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.

New ABIs can be added to an existing namespace without breaking
anything.  But I believe we decided to always bump the namespace
after a branch from HEAD and all new and ABI-changed symbols get
added to that new namespace.

This will allow us to write tools to check if a binary
compiled on one release can run on an earlier release.

Also, this does not prevent us from MFC'ing those symbols back
to previous releases, they just have to be added to the
same namespace from which they came.

--=20
DE
---559023410-684387517-1202058388=:8686--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0802031201040.8686>