LD_PRELOAD
Andrew Pimlott
pimlott@MATH.HARVARD.EDU
Fri May 21 00:08:00 GMT 1999
On Fri, 21 May 1999, Geoff Keating wrote:
> Such techniques (overriding routines in the libc) have always been
> implementation-dependent. You will probably need to do various
> special things to make it work with glibc 2.1, if this is possible at
> all.
Nonsense. I have an LD_PRELOAD'ed library I use every day that's source
and binary compatible between glibc 2.0 and 2.1, and source compatible
between linux and solaris.
> Have you considered implementing your functionality in the kernel
> instead? Or building a custom version of libc with the changes you
> want to make included?
Are you crazy?! That's an order of magnitude more work. LD_PRELOAD is
just perfect for this purpose.
As for one of the programs mentioned in particular, dante, I hope to look
into its LD_PRELOAD problems sometime soon.
Andrew
More information about the Libc-alpha
mailing list