From: murphy@dco.dec.com (Rick Murphy)
Subject: Re: any utilities to work with shared libraries?
Date: 11 Nov 1994 20:57:24 GMT [thread overview]
Message-ID: <3a0lrk$3fa@decuac.dec.com> (raw)
In-Reply-To: 3a036v$grt@spruce.cic.net
One (possible) way to do what you want is to use a replacement library -
link your new routines in a different shared object, let's say "replace.so".
Then, use the loader arguments to force your routines to be used.
For example, the "malloc_dbg" package has the following instructions:
[btw: I'm not the author of this - Dave Hill (ddhill@zk3.dec.com) wrote this
information. Credit where credit is due.]
The OSF1/AXP shared library loader has the capabilities to override the
shared libraries used, even to the extent that it takes symbols from a
library that the program was not linked with. Using this technique, you
may override the standard malloc in libc with the debug malloc shared
library.
_RLD_LIST=/path_to_the_dir/libmalloc_dbg.so:DEFAULT;export _RLD_LIST
Remember though, setting this variable will affect ALL commands invoked
from the shell that it is set inside of. You may wish to do this inside
of a shell script that sets the variable just before starting your
program. Another option with sh and ksh is to list the environment
variables on the program invocation line, for example:
_RLD_LIST=/path_to_the_dir/libmalloc_dbg.so:DEFAULT program
This command will set the specified env variable and then run program.
--
Rick Murphy, WA1SPT/4 Washington Federal Programs Office
Domain: murphy@dco.dec.com Technical Support Group
Bang: decwrl!burfle.enet!murphy This posting expresses MY opinions only;
Ding: 301-306-2040. I do not speak for Digital.
prev parent reply other threads:[~1994-11-11 20:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-07 23:10 any utilities to work with shared libraries? Ron Young
1994-11-11 15:39 ` Paul Southworth
1994-11-11 20:57 ` Rick Murphy [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox