From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b3cc53a4cd752b49 X-Google-Attributes: gidfee84,public From: curts@compgen.com (Curt Smith) Subject: Re: Wrappers for shared library functions? Date: 1997/03/06 Message-ID: <5fme1j$mhc$1@metro.atlanta.com>#1/1 X-Deja-AN: 223499062 References: <331D5BCE.5329@netcomuk.co.uk> <331EB4EA.2A0@netcomuk.co.uk> Organization: Internet Atlanta Newsgroups: comp.unix.osf.osf1 john hall (jhall@netcomuk.co.uk) wrote: : 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, : : 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". Sure enough... I just did: cp /usr/shlib/libm.so /tmp vi /tmp/libm.so And there's libc.so in a list of other (guess) dependancies. Given that the start point of the "l" in libc.so must be left in place, and there's strings immediately following, your ownly choice of hacking libm.so or libxxx.so for that mater is to make the dependancy on libc.so to be libC.so. Where you just change the characters of the dependant library. Therefore do: - Make your wrapper library named: libm.so (or what ever you're wrapping) - Make the real library named: libM.so - Edit libM.so to make the dependancies on libm.so to be libM.so. Good luck. Curt Smith curts@compgen.com