Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-alt
On 02/13/2011 04:04 PM, Perry Smith wrote:
> On Feb 11, 2011, at 3:23 AM, Michael Haubenwallner wrote:
>>
>> How I prefer doing "shared libraries" with "soname" on AIX now is:
>>
>> *) 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 line, being the "soname" emulation:
>> #! libNAME.so.1(shr.o)
>> - another header line telling the bits used:
>> # 32
>> or
>> # 64
>> - 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
>> *) Create the static library archive "libNAME.a" from static objects.
>
> Do you recall the advantage of having a import file plus the shared
> object in the archive? What problem does that solve that having
> just the shared object creates?
Actually I've used to do standalone both Import File libNAME.so and
shared object libNAME.so.1 - which indeed did work for Prefix so far.
However, to get a better chance for upstream integration - especially
into libtool, I've had to look at the Big Picture:
*) Multilib:
Using an archive, it is possible to provide both 32/64 bit shared
objects within one single file - much like AIX libc.a and others do.
We don't do multilib in Prefix.
*) Dynamically load both with and without 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.
Must admit that I've not seen a package I've built on AIX so far
where this actually is necessary.
*) All-in-one file to call "shared library (with soname)":
This is necessary to allow wrapping the linker to support the '-soname' linker
flag, so existing packages without explicit AIX build support can work right
out of the box. This even includes those symlinks known from ELF-world.
For Prefix this does help a lot as sys-devel/native-cctools provides this
ld-wrapper now: I've been able to drop *all* AIX-specific patches and
handling from within app-arch/bzip2-1.0.6-r1 now.
These (and more) reasons are also listed in libtool-list archives:
http://lists.gnu.org/archive/html/libtool/2011-01/msg00023.html
http://lists.gnu.org/archive/html/libtool/2011-02/msg00000.html
/haubi/
--
Michael Haubenwallner
Gentoo on a different level
|
|