[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using a linker version script

From: Ludovic Courtès
Subject: Re: Using a linker version script
Date: Fri, 14 Aug 2009 16:16:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Neil Jerram <address@hidden> writes:

> address@hidden (Ludovic Courtès) writes:
>> It also makes it possible to provide two versions of the same symbol,
>> e.g.:
>>   SCM scm_from_string (const char *)                --> GUILE_2.0
>>   SCM scm_from_string (const char *, scm_t_handler) --> GUILE_2.1
>> Applications that were compiled against libguile 2.0 will keep using the
>> GUILE_2.0 version of the function, while those compiled against 2.1 will
>> use the GUILE_2.1 version.
>> Technically, defining multiple versions of a given symbol is achieved
>> using the `.symver' GNU as directive:
>>    __asm__ (".symver scm_from_string_v2_0,address@hidden");
>>    __asm__ (".symver scm_from_string,address@hidden");
> That sounds very cool.  But given that we try to consider non-GNU
> platforms too, will it really give us more options than we have at
> present?

It will give us more options on GNU (and possibly Solaris) but not on
the other platforms.  So that won't affect our policy of not breaking
the ABI during a stable series.

On GNU and Solaris, we may be able to reduce the number of applications
that have to be recompiled when a new major version comes out by:

  - having per-symbol binary compatibility info, as opposed to Libtool's
    coarse-grain `-version-info'.

  - providing older versions of symbols that have changed.

I see it essentially as an additional "safety net", and something that
GNU/* distribution maintainers will appreciate.

Section 3.3 of [0] contains a discussion of this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]