On 01/21/2011 08:19 AM, Michael Haubenwallner wrote:
Hello!

Hi.

Library versioning for AIX would be a great feature.


After playing around with different ways[1], this is my proposed one,
using an AIX feature called "Import Files":

*) Create the shared object "shr.o" (using '-G' linker flag).
*) Set the LOADONLY flag for "shr.o" (using 'strip -e').
*) Create the Import File "shr.imp", containing
    - this header:
        #! libNAME.so.1(shr.o)
        # autoload
        #! libNAME.so.1(shr.o)
    - the list of symbols exported.
*) Create the archive library "libNAME.so.1.2.3" from both
    "shr.imp" and "shr.o".
*) Create the symlinks as usual:
    libNAME.so.1 ->  libNAME.so.1.2.3
    libNAME.so ->  libNAME.so.1.2.3

Using this way, for existing packages it might be necessary to give the
package manager the choice whether to "--enable-aix-soname", or to keep
the old way the package used to create "libNAME.so" before.

If I upgrade a library from say version 1.2.3 to 1.2.5, with both having the same libtool version information, but with 1.2.3 linked with the current -brtl libtool system, and 1.2.5 using your proposed method, will clients of the library still work?


The reasons to choose this way:

*) It is possible to dlopen() with or without a version number:
    - dlopen("libNAME.so(shr.o)", RTLD_MEMBER), besides the preferred
    - dlopen("libNAME.so.1(shr.o)", RTLD_MEMBER), and even
    - dlopen("libNAME.so.1.2.3(shr.o)", RTLD_MEMBER) does work.

Does dlopen("libNAME.so", RTLD_GLOBAL|RTLD_NOW) (for example) without RTLD_MEMBER work?

Do you currently have patches for libtool, or do you want pre-approval before working on them? If you have any, even if only half finished, I would like to see them.

Peter

_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to