[SSSD] ding-libs: symbol versioning is necessary

Jan Engelhardt jengelh at inai.de
Fri Feb 21 14:35:13 UTC 2014


On Friday 2014-02-21 11:00, Lukas Slebodnik wrote:
>
>You started this discussion about version dependency in ding-libs.
>There is opportunity to be active and help us with testing and reviewing patch.
>https://lists.fedorahosted.org/pipermail/sssd-devel/2014-February/018553.html
>
>Any comments are appreciated.

Certainly.
[That mail has not hit the downloadable .gz archives yet and there is no git
branch for it, so building the package on my side will be delayed./
The non-gz mailman archive has tabs replaced by spaces.]
Comments without building thus:

The .sym files should be listed in Makefile.am in a _DEPENDENCIES line
instead of _SOURCES. When they are in _SOURCES, `touch *.sym && make`
won't relink the library, when they are in _DEPENDENCIES, they will:

libpath_utils_la_SOURCES = path_utils/path_utils.c
libpath_utils_la_DEPENDENCIES = path_utils/libpath_utils.sym

The sym file will be part of `make dist` as before without having it
to list in _SOURCES.

>+LIBBASICOBJECTS_0.1.0 {
>+global:
>+    simplebuffer_free;
>+    ...
>+local:
>+    *;
>+};
>+
>+LIBBASICOBJECTS_0.1.1 {
>+global:
>+    simplebuffer_get_vbuf;
>+} LIBBASICOBJECTS_0.1.0;

Since this is the initial presence of symvers in the library, there is not
specifically a need to have more than one symbol: there exists no program
out there that already references the LIBBASICOBJECTS_0.1.0 symbol,
so you can just put all symbols under _0.1.1.
This also applies to all the other .sym files.


Referring to libini_config for this next example:

The symbol name is connected to the library, so it does not need to try to
be unique across the entire system AFAICS. If you like you can make it shorter,
for example "ABI_4 { ... }" to point out that these functions were added
in version 4 (cf. libtool number in -version-info). Or V_4. Whichever :)



More information about the sssd-devel mailing list