[libannodex-dev] Re: [libcmml-dev] Symbol versioning in libcmml(and probably the rest of the annodex suite)

Jamie Wilkinson jaq at spacepants.org
Mon Apr 3 22:58:57 EST 2006


This one time, at band camp, Silvia.Pfeiffer at csiro.au wrote:
>I'm more than happy for you to fix it though!
>Feel free to contribute it into subversion and increase any version
>numbers you require.

I was just about to, and I've just found that I don't remember what the URL is
for checkin access, nor do I remember things like passwords and/or SSH keys
for doing so.

>I only recently learnt how to do the version numbers properly, so there
>may have been inconsistent version numberings in the past anyway.

Basically, two libraries with the same code can be installed at the same
time if they have different SONAMES, i.e. libcmml.so.0.0.9 and libcmml.1.0.0
can co-exist on the filesystem.

Symbol versioning is important when a program links against one versoin of
the library, and links against another library that links against a
different version of the library, like so:

 A
 | \
 B  C
    |
    B'

If B is not versioned, then whichever gets loaded by the dynamic linker
first will be used because the symbol names can only resolve to one place.
With versioning, you can load both B and B' into the address space and it
will do the right thing, because A will know to look for version B and C
will be able to find B' symbols.

Chapter 15 of the Debian LPG gives a better explanation of this, though :)
http://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html#symbolversioning

So, in libcmml, it's not really that important yet, but it's something to be
aware of; when the versioning is required, you've made the same version for
all releases of libcmml so resolving a versioned symbol is still going to be
ambiguous if libcmml.so.0 and libcmml.so.1 are loaded into the same address
space.



More information about the libannodex-dev mailing list