From: dave@thor.sbay.org
Date: Fri, 26 Nov 1999 21:09:03 -0800 (PST)
To: Karen Shaeffer <shaeffer@best.com>
cc: svlug@svlug.org
Subject: [svlug] Re: how to use LD_PRELOAD? WAS: Re: where is wordperfect?

On Fri, 26 Nov 1999, Karen Shaeffer wrote:

> If only one of LD_PRELOAD and LD_LIBRARY_PATH is defined, then their effect
> is equivalent. If both are defined, then the run-time linker utilizes this
> sequence:
> 
> LD_PRELAOD or /etc/ld.so.preload
> LD_LIBRARY_PATH 
> /etc/ld.so.cache
> /usr/lib
> /lib

Not according to the man page:

<quote>

LD_PRELOAD
  The name of an additional, user-specified, shared library to be loaded
  after all others.  This can be used to selectively override functions in
  other shared libraries.

</quote>

Therefore the order would be:

LD_LIBRARY_PATH
/etc/ld.so.cache
/usr/lib
/lib
LD_PRELOAD

And consequently, LD_PRELOAD and LD_LIBRARY_PATH are not the same, when
only one is defined.

LD_PRELOAD has to be loaded last, or the httpfs pre-load hack wouldn't
work.

davez

-- 
Dave Zarzycki
http://thor.sbay.org/~dave/
http://www.sbay.net/

