From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,da1c89d811e6d0e8 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-11-11 23:37:04 PST Path: nntp.gmd.de!xlink.net!rz.uni-karlsruhe.de!news.uni-stuttgart.de!news.belwue.de!news.dfn.de!swiss.ans.net!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!yeshua.marcam.com!charnel.ecst.csuchico.edu!olivea!koriel!wnoc-sfc-news!news.dec-j!jrd.dec.com!mets86.mse.tay.dec.com!pa.dec.com!decuac.dec.com!dco.dec.com!murphy From: murphy@dco.dec.com (Rick Murphy) Newsgroups: comp.unix.osf.osf1 Subject: Re: any utilities to work with shared libraries? Date: 11 Nov 1994 20:57:24 GMT Organization: Digital Equipment Corporation, Landover MD Sender: murphy@rhmosf.dco.dec.com (Rick Murphy) Distribution: world Message-ID: <3a0lrk$3fa@decuac.dec.com> References: <39mc5o$6fj@news.nevada.edu> <3a036v$grt@spruce.cic.net> Reply-To: murphy@dco.dec.com NNTP-Posting-Host: rhmosf.dco.dec.com X-Newsreader: mxrn 6.18-27 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.