agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Paul M. Aoki <aoki@cs.berkeley.edu>
To: postgres-arch@postgres.Berkeley.EDU
Subject: dlopen for AIX
Date: Thu, 17 Aug 1995 19:43:30 -0700
Message-ID: <199508180243.TAA28006@epoch.CS.Berkeley.EDU> (raw)
Newsgroups: comp.unix.aix
From: hook@chaco.aix.dfw.ibm.com (Gary R. Hook)
Subject: Re: dynamic loading routines on AIX
Message-ID: <CrI4Hz.5oHp@hawnews.watson.ibm.com>
Date: Thu, 16 Jun 1994 17:56:23 GMT
In article <1994Jun13.121014.6678@ais.com>, rose@ais.com writes:
|>
|> Hi, can anybody tell me what routines on AIX do the dynamic loading? basically
|> I'm looking for the corresponding routines of dlopen(), dlsym(), and dlclose()
|> on SunOS, or shl_load(), shl_findsym() and shl_unload on HP-UX; I would think
|> AIX uses the same set of routines as SunOS, because it's also a BSDish system,
|> but I couldn't find them on our RS6000 box.
AIX provides a load() function, loadbind(), and unload(). The load()
function loads an object and returns a pointer to the entry point
of the object (should be a function pointer). While one usually
exports any symbols which should be globally available, there is no
mechanism which allows you to look up by name a symbol and get a
pointer to the definition. So, dlsym() or shl_findsym() don't really
have a comparable version on AIX 3.x.
Now then.
There does happen to be an "RPQ" from IBM which implements:
1) replacable symbols within shared libraries.
2) the dl*() API for shared/loaded objects.
The RPQ is implemented as a set of commands that are used to build
applications in a manner which allows a runtime environment to do
the symbol replacing based on command line ordering of objects.
One limitation is, however, that the shared libraries must be built
in this manner; thus, it still doesn't let you conveniently do things
like replace malloc(), etc. Also, there is a performance hit in that
the tools insert global linkage code for every symbol. This adds
execution overhead for every subroutine call. Finally, the current
implementation is only verified to work with xlc and xlf; no gcc,
no CSet++.
The end result is that these tools provide a System V-like flavor
of shared library behavior. I suppose a more elaborate posting of
information might be in order...
The RPQ number is P91129. You have to go to your local IBM contact
and ask them to request this RPQ. Unfortunately, the RPQ is I-listed,
which is IBM-ese for "restricted access." So, the magic incantation
is "escalate."
More details at a later date...
--
________________________________________________________________________
Gary R. Hook | "It's hard to work in groups
AIX Application Enabling | when you're omnipotent."
IBM Corporation, Southlake, Texas | - Q in Star Trek: The Next
The above opinions are all mine. | Generation
--
Paul M. Aoki | University of California at Berkeley
aoki@CS.Berkeley.EDU | Dept. of EECS, Computer Science Division (#1776)
| Berkeley, CA 94720-1776
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: aoki@cs.berkeley.edu, postgres-arch@postgres.Berkeley.EDU
Subject: Re: dlopen for AIX
In-Reply-To: <199508180243.TAA28006@epoch.CS.Berkeley.EDU>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox