This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: on AIX, which "soname"-equivalent to prefer with runtime linking?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]