public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RFC: on AIX, which "soname"-equivalent to prefer with runtime linking?
@ 2011-02-10 10:47 Michael Haubenwallner
  0 siblings, 0 replies; only message in thread
From: Michael Haubenwallner @ 2011-02-10 10:47 UTC (permalink / raw)
  To: binutils

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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-10 10:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 10:47 RFC: on AIX, which "soname"-equivalent to prefer with runtime linking? Michael Haubenwallner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).