Gentoo Logo
Gentoo Spaceship




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
Navigation:
Lists: gentoo-alt: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-alt@g.o
From: Michael Haubenwallner <haubi@g.o>
Subject: Re: Breaking news: Need to start over on AIX
Date: Mon, 21 Feb 2011 17:29:03 +0100
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


References:
Breaking news: Need to start over on AIX
-- Michael Haubenwallner
Re: Breaking news: Need to start over on AIX
-- Perry Smith
Re: Breaking news: Need to start over on AIX
-- Michael Haubenwallner
Re: Breaking news: Need to start over on AIX
-- Perry Smith
Navigation:
Lists: gentoo-alt: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Breaking news: Need to start over on AIX
Next by thread:
[PREFIX] planned removal of Python 2.4 and 2.5
Previous by date:
Re: AIX linking adventure
Next by date:
Missing ebuild ?


Updated Jun 07, 2012

Summary: Archive of the gentoo-alt mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.