This is the mail archive of the
mailing list for the binutils project.
RFC: on AIX, which "soname"-equivalent to prefer with runtime linking?
- From: Michael Haubenwallner <michael dot haubenwallner at salomon dot at>
- To: binutils at sourceware dot org
- Date: Thu, 10 Feb 2011 11:46:56 +0100
- Subject: RFC: on AIX, which "soname"-equivalent to prefer with runtime linking?
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 .
After some more playing with the AIX multilib way, I've slightly modified
that way regarding the "# autoload" thing .
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:
- another header line telling the bits used:
- 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" .
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.