Enhanced symbol versioning in 2.7.x

Simon Josefsson simon at josefsson.org
Mon May 25 10:27:25 CEST 2009


Andreas Metzler <ametzler at downhill.at.eu.org> writes:

> Hello,
>
> with 2.7.x you seem to have started to use a different symbol
> versioning for newly added symbols (since 2.6.x). Well, at least that
> is my understanding. ;-) I am not sure abut the point, is this for
> RedHats automatically versioned library dependencies?

It helps to track ABI versioning, and can be useful even in Debian:
http://wiki.debian.org/Projects/ImprovedDpkgShlibdeps

> Anyway, I think this patch should be applied,
> gnutls_x509_crq_set_key is already present in 2.6.6, versioning it
> @GNUTLS_2_8 would break the ABI, afaik.

Thanks!

I'm going to build the latest gnutls 2.6.x release and compare the
exported symbols with what's in the file now, it would be bad if
mistakes like this made it into the 2.8.0 release.

> I assume that if there was a soname bump we would change from
> --------------
> GNUTLS_1_4
> {
> ...
> };
>
> GNUTLS_2_8
> {
> ...
> } GNUTLS_1_4;
>
> GNUTLS_PRIVATE {
> };
> --------------
>
> to 
>
> --------------
> GNUTLS_2_10
> {
> [symbols listed previously in GNUTLS_1_4 or GNUTLS_2_8 go here]
> };
>
>
> GNUTLS_PRIVATE_2_10 {
> [symbols listed previously in GNUTLS_PRIVATE go here]
> };
> --------------
> Am I correct?

That's not required, but I don't see how it would hurt from a technical
point of view.

I don't see any advantage in that, though, because having the old
version names even in the new soname bump can be informative.

On the other hand, the current name GNUTLS_1_4 is confusing because even
symbols added up until GnuTLS 2.6 is included under that label.

So if we do a soname bump at some point maybe we could rename GNUTLS_1_4
to GNUTLS_LEGACY or similar.  But it doesn't really matter, since the
symbol names are only for human interpretation.

> On a sidenote gnutls_x509_crq_set_basic_constraints and
> gnutls_x509_crq_set_key_usage are new in 2.7.x. If my understanding
> were correct they should be versioned @GNUTLS_2_8 instead of
> @GNUTLS_1_4.

Also fixed.  Thanks.

/Simon





More information about the Gnutls-devel mailing list