Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: john hall <jhall@netcomuk.co.uk>
Subject: Re: Wrappers for shared library functions?
Date: 1997/03/06	[thread overview]
Message-ID: <331EB4EA.2A0@netcomuk.co.uk> (raw)
In-Reply-To: 331D5BCE.5329@netcomuk.co.uk


I (john hall) wrote:
> 
> I would be very grateful for any advice on how to create "wrappers" for
> one or two functions in large shared libraries,

Apologies for adding to my post,.......

I should have stated that this is for OSF/1 /DU v2.x, v3.x and v4.x.

I do not have sources for either the calling applications or the
libraries (e.g. libm.so) - hence the need for "transparency".

I've tried renaming an existing library file and creating a replacement
dummy library which has the renamed real one as a dependency. However, 
the loader is unable to resolve symbols contained in the renamed real
library. It appears that the name of the shared library is also stored
in the library file itself. 

As a consequence, although the renamed shared library file (e.g. 
libRenamedReal.so) is found by ld when creating the "dummy" libReal.so,
the dependencies of the dummy library (revealed through odump -Dl)
include the name "libReal.so" instead of "libRenamedReal.so". 

Hence the loader appears never to try and load libRenamedReal.so 
when loading the dummy libReal.so, even though ld had to check against
symbols it contains when creating the dummy. Humph.

Archived newsgroup articles on this topic suggest that a library
preload technique can be used on Solaris, but I have not been able to
locate any equivalent on DU.

regards
john hall



  reply	other threads:[~1997-03-06  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-05  5:00 Wrappers for shared library functions? john hall
1997-03-06  5:00 ` john hall [this message]
1997-03-06  5:00   ` Curt Smith
1997-03-11  5:00 ` Craig Neth USG
1997-03-13  5:00   ` john hall
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