[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AIX library creation for dynamic loading

From: Jeff Trawick
Subject: Re: AIX library creation for dynamic loading
Date: 24 May 2002 08:12:32 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

address@hidden (Don Anderson) writes:

> Hello,
> I seek your advice on some weirdness I've noticed with AIX 4.3.3.  I
> want to create a shared library for dynamic loading using libtool with
> the -module option.  When the AIX linker (or something in the compiler
> chain) creates the shared library, it is put into a .a file.  That is,
> it creates libfoo.a, a static archive of one element, which is
>, and that shared object has an SONAME of
> Apparently, the linker knows how to link and run against that animal
> if you just wanted to link.  But if you want to dynamically load it
> (say from java or Tcl), these programs cannot dlopen the .a.  So I
> need to do a post-install step like this:
>    $ ar xv libfoo.a
>    x -
>    $ ln -s
> This gives me a that I can dlopen directly.

A couple of hints:

1) If you want to load a member of an archive on AIX, add the
   RTLD_MEMBER flag to your normal dlopen() flags.  You can then
   specify    "libfoo.a(" as the object to load.

2) As I understand it, libtool doesn't create the non-archive style of
   shared library on AIX unless it thinks you are using run-time
   linking (-Wl,-brtl).  You may or may not want run-time linking.

Jeff Trawick | address@hidden
Born in Roswell... married an alien...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]