03-13-2006
11,728,
1,345
Join Date: Feb 2004
Last Activity: 8 May 2020, 9:07 AM EDT
Location: NM
Posts: 11,728
Thanks Given: 903
Thanked 1,345 Times in 1,201 Posts
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.