What does LD_PRELOAD signify?

Hi,

What does LD_PRELOAD variable signify on HP-UX?

thanks in advance,
-Ashish

LD_PRELOAD asks dld to load a named shared library first, it's called interposing a library.

In simple terms, if you have a call to some function in libc like printf, and another printf function in myshlib.sl, then by loading myshlib first, the functionality of myshlib is interposed, ie. replaces the functionality of the original libc call. It's used mainly for profiling and debugging. It's also one of the reasons why secure systems don't allow everybody access to shell. You can hijack any program with it.

I did not know that HPUX supported it.... if it does, then there's your answer.

LD_PRELOAD is not supported on HP-UX by the dynamic loader and I'm not aware of any other program that uses it.

Many thanks Jim, Perderabo.

-Ashish

Using static and shared libraries across platforms

Please take a look at this.

Try dld.sl....it should work