libtool
[Top][All Lists]
Advanced

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

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


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

On 01/23/11 07:31, Daniel Sands wrote:
>>>> 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?

Oh, overlooked this question first.

>> However, it seems that for all of the requested functionality, it may be 
>> necessary to have an
>> AIX-specific libtool script and maybe even an AIX-specific LTDL.

libtool script is generated and is platform specific anyway, and
LTDL is designed to have platform specific implementation when necessary.
So the libtool part is not a problem here.

> So the libs are named with .so, but they are apparently in .a format, 
> according to the above dlopens.

While this actually is the shiny new thing here, it may be the biggest
problem: Not being obvious that the .so file actually is an archive.
However, I do think this is acceptable, given that the traditional
way is different anyway (in having an archive file as shared library).

If not to say: "Shared libraries on AIX are archive files, period."

> In that case, RTLD_MEMBER is required and must include the member object name.

Exactly.

I haven't found a way to be compatible to the current way. So, as said before,
for current versions (=sonames) of packages it has to be up to the package 
manager
to choose whether to use the old (no soname) or new (with soname) way, while
for new package versions (=sonames) it could be up to the package maintainer
to force the new way (with soname), not allowing the old one any more.

/haubi/



reply via email to

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