libtool
[Top][All Lists]
Advanced

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

Re: Opening libraries by soname


From: Paolo Bonzini
Subject: Re: Opening libraries by soname
Date: Mon, 10 Dec 2007 10:56:47 +0100
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)


The only way I see that happen in a sane way is to have all three
libtool version numbers passed to a new lt_dlopenadvise API (CVS HEAD)
and have libltdl compute the soversion from there.

Yes, that's a good idea for the interface. But the implementation is no less of a mess. First, as you pointed out, it is heavily dependent on the OS. The libtool scripts already knows all the special cases, they should be rewritten in C; but a small problem is that for some OSes the AGE is not encoded in the soname and the user of the API should know it and pass it (so that CURRENT - AGE is used instead of CURRENT, etc.).

The number of system calls is not a problem to be easily fixed. People will not want to give a specific soname. They will want to give CURRENT value and possibly a REVISION value (defaulting to 0); then any library will be ok with A.B.C satisfying "A = CURRENT and C >= REVISION" or "A < CURRENT <= A + B". On some OSes we can make educated guesses (especially if the AGE is passed), but on others (actually on all, in the worst case) one needs to read all of /usr/lib.

Finally, there can be only one .la file for each copy of the library, right? On which OSes is it a problem to load dependent libraries separately?

Paolo




reply via email to

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