Subject: Re: Playing with ELF
To: Quentin Garnier <netbsd@quatriemek.com>
From: David Laight <david@l8s.co.uk>
List: netbsd-users
Date: 03/06/2003 08:52:00
> To make a long story short, I want to edit NVidia's libGL.so.1 to add a
> dependancy on libpthread.so

Won't an entry in /etc/ld.so.conf do what you want?

> (for the __error symbol, binary-editing it to __errno is fine).
Did you remember to fixup the hash chains?

> The reason behind this is that if a wrapper library (which contains
> nothing but a dependancy on the real libGL and libpthread) is convenient
> for binaries linked against libGL, it is not the case for binaries the
> dlopen() it (like the Quake series which use a modular renderer). The
> latter can work, but not without having to configure it to load the
> correct library (which can sometimes mean patching the source).

Or build another library that has 'needed' entries for libGL and
libpthread and put it where programs expect libpthread to be found.
Call the real libpthread something else.
(You'll probably need to create a library with the known 'soname'
in order to generate this library.)

	David

-- 
David Laight: david@l8s.co.uk