[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: on AIX, which "soname"-equivalent to prefer with runtime linkin
Re: RFC: on AIX, which "soname"-equivalent to prefer with runtime linking?
Sat, 22 Jan 2011 10:41:20 -0600
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:126.96.36.199) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Thunderbird/3.1.7
On 01/21/2011 08:19 AM, Michael Haubenwallner wrote:
Library versioning for AIX would be a great feature.
After playing around with different ways, 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:
- 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
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.