From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9130 invoked by alias); 10 Feb 2011 10:47:07 -0000 Received: (qmail 9121 invoked by uid 22791); 10 Feb 2011 10:47:07 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtpout06.highway.telekom.at (HELO email.aon.at) (195.3.96.89) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Feb 2011 10:47:02 +0000 Received: (qmail 27331 invoked from network); 10 Feb 2011 10:46:59 -0000 Received: from 93-82-100-39.adsl.highway.telekom.at (HELO [10.0.0.1]) ([93.82.100.39]) (envelope-sender ) by smarthub96.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 10 Feb 2011 10:46:58 -0000 Message-ID: <4D53C220.8050108@salomon.at> Date: Thu, 10 Feb 2011 10:47:00 -0000 From: Michael Haubenwallner 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 MIME-Version: 1.0 To: binutils@sourceware.org Subject: RFC: on AIX, which "soname"-equivalent to prefer with runtime linking? Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00099.txt.bz2 Hello! On libtool list I've started a thread to get some consensus upon how to create shared libraries on AIX to provide full "soname" support with runtime linking enabled [1]. After some more playing with the AIX multilib way, I've slightly modified that way regarding the "# autoload" thing [2]. As a result, the current status of the way I'm after a consensus upon 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. For projects not using libtool, recently I've hacked up a wrapper around AIX-ld to provide the '-soname' (and similar) flag, creating the "shared library" actually being an archive containing "shr.imp" and "shr.o" [3]. First, what do you (at binutils) think all about this? However, this wrapper uses AIX-specific tools to set the LOADONLY flag and to extract the list of exported symbols from the shared object. So, second, what I don't know yet is how this could work in a cross-aix setup using recent binutils. Must admit I've not built recent binutils for AIX yet, neither cross nor native. [1] http://lists.gnu.org/archive/html/libtool/2011-01/msg00023.html [2] http://lists.gnu.org/archive/html/libtool/2011-02/msg00000.html [3] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/native-cctools/files/ld-aix-1?revision=1.1&view=markup Thank you! /haubi/