[Top][All Lists]

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

Re: RFC: on AIX, which "soname"-equivalent to prefer with runtime linkin

From: Michael Haubenwallner
Subject: Re: RFC: on AIX, which "soname"-equivalent to prefer with runtime linking?
Date: Mon, 24 Jan 2011 10:23:52 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20110113 Lightning/1.0b3pre Lanikai/3.1.7

On 01/22/11 17:41, Peter O'Gorman wrote:
> 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:
>>         #!
>>         # autoload
>>         #!
>>     - the list of symbols exported.
>> *) Create the archive library "" from both
>>     "shr.imp" and "shr.o".
>> *) Create the symlinks as usual:
>> ->
>> ->
>> 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 "" 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?

(assuming 1.2.5 is binary compatible to 1.x, the soname (on Linux) is,
while version 2.0.0 is incompatible and does have soname

Currently, subsequent executables require "" to be a standalone
shared object. When using the new way, "" is (a symlink to) an
archive file.

The simple answer is: No.

However, when upgrading to version 2.0.0, existing binaries will be broken
anyway, even with the old way where "" is the shared object.
Unless you --enable-aix-soname even for version 1.x, you are unable to upgrade
to 2.0.0 without breaking existing binaries, even when keeping the old shared
object around somewhere.
So in both cases, either enabling aix-soname or upgrading to 2.0,
you have to rebuild the reverse dependencies anyway.

This is the reason why the package /manager/ has to have the choice whether
to --enable-aix-soname or not, as only she may have control over the packages
currently linked against that "soname" of the library.

OTOH, when the package /maintainer/ does a soname bump, she might want to
force the aix-soname without leaving the choice to --disable-aix-soname,
as existing binaries using this libraries will break anyway.

>> The reasons to choose this way:
>> *) It is possible to dlopen() with or without a version number:
>>     - dlopen("", RTLD_MEMBER), besides the preferred
>>     - dlopen("", RTLD_MEMBER), and even
>>     - dlopen("", RTLD_MEMBER) does work.
> Does dlopen("", RTLD_GLOBAL|RTLD_NOW) (for example) without 
> 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.

For the last few years, I've played around with different ways here to learn
which way could be the best one.
While the patches I currently have do provide shared library versioning, they
do not do this proposed way yet. Unfortunately, they do not create the soname as symlink to an archive file, but as standalone shared object,
while is the symlink to an archive file containing the import file.
Additionally, they do force -no-undefined ATM.

And yes, I'd like to have some commitment now upon /how/ I break all my
packages on AIX once again.

Anyway, you've asked for half finished patches:


reply via email to

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