cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: New push functions

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Tue, 21 Jul 2015 10:56:37 +0200

On Monday 20 July 2015 19:28:30 Patrick Monnerat wrote:
> The same discussion occurs each time there is some reason to change
> VERSIONINFO.
>
> The answer is: an soname bump always causes the linked programs to be
> rebuilt. However, we must talk about VERSIONINFO bump rather than SONAME
> bump (my bad).
>
> In short (for symbol addition only):
> - Many OS deals with symbol names: in this case, the order in the table
> may even change without impact --> no need to change the SONAME.
> - Some other OS use position in table: as long as you don't change the
> symbol order in the table, there's still no need to change the SONAME if
> you only add new symbols to the end of the table.
> - Finally, some other OS have a symbol table signature that is copied to
> the calling binary program at link time, and that must match at
> execution time. In this case, any change to the symbol table should be
> reflected by an SONAME change.
>
> The three rules for changing VERSIONINFO accomodates this OS dependency:
> - OS that do not need a SONAME change on symbol addition uses C-A as the
> soname value: since C and A are both bumped by 1 on addition only. If a
> deletion occurs, A is cleared and the soname bump occurs.
> - The other OS use C alone, which is bumped on any symbol table change.

Thanks for the explanation! It makes sense to me now. I was not aware of
the VERSIONINFO -> SONAME mapping magic.

> As a result, on linux, the soname is currently 4. On iseries, it is 8.
>
> On each platform, soname is monotonically increasing, but this is more
> often on iSeries. As a consequence, a linux soname may skip many numbers
> when an soname bump is really needed (i.e.: when a symbol is deleted).
> If a symbol was deleted just now, VERSIONINFO should be set to 9:0:0
> (from 8:0:3), so the soname will jump from 4 to 9 on linux and from 8 to
> 9 on iSeries...

I tried it on Linux. SONAME stayed unchanged (libcurl.so.4). The actual
file name of the library changed from libcurl.so.4.3.0 to libcurl.so.4.4.0
but it should not break the linkage since all packages on the system link
against the libcurl.so.4 symlink. Is this assumption correct?

Kamil

> I have never seen an OS that uses the R part of the VERSIONINFO.
>
> :-)
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-07-21