This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [0/21] Add support for AIX 6
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Michael Haubenwallner <michael dot haubenwallner at salomon dot at>
- Cc: Ian Lance Taylor <iant at google dot com>, binutils at sourceware dot org, richards at transitive dot com
- Date: Tue, 10 Mar 2009 14:18:01 -0400
- Subject: Re: [0/21] Add support for AIX 6
>>>>> Michael Haubenwallner writes:
> Did you also think on providing some 'soname' support for AIX?
> When runtime linking (-brtl) is active, at link-time the import file is
> found, recording "libNAME.so.X(shr.o)" into the resulting binary for
> run-time.
Interesting approach.
Because AIX archives can hold multiple shared objects and shared
objects can be tagged as load-only, the traditional concept on AIX is
intended to be something like:
- create new shared object libNAME.so.X.Y.Z
- unpack existing shared objects from archive
- set most recent shared object as load-only
$ strip -e libNAME.so.X.Y.Z-1
- archive the old and new shared objects in libNAME.a
The F_LOADONLY flag in the object header means that the shared
object will be ignored by the ld command when linking the archive,
but available to the runtime loader. Previously linked applications
will refer to the old shared object members in the archive and newly
linked applications will refer to the most recent shared object.
The AIX linker does not require that the file extension match the contents,
so a shared object could be named libNAME.a -- not an archive containing
the file, but the file itself. As you imply, libNAME.so could be an archive.
Ignoring naming conventions does generate some confusion.
Because AIX ld dynamic linking and the -brtl option does support
ELF-style shared objects, one also can establish the soname
libraries and symbolic links directly:
- create libNAME.so.X.Y.Z
- create the symlinks known from linux/elf:
libNAME.so -> libNAME.so.X
libNAME.so.X -> libNAME.so.X.Y.Z
Linking an executable with libNAME.so and using -brtl option
will associated libNAME.so with the executable, not
libNAME.so.X.Y.Z. and not any archive members.
David