Sponsored Content
Top Forums UNIX for Advanced & Expert Users What does LD_PRELOAD signify? Post 101801 by jim mcnamara on Monday 13th of March 2006 10:32:09 AM
Old 03-13-2006
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.
 

5 More Discussions You Might Find Interesting

1. Linux

LD_PRELOAD on x86_64 gives error from ld.so

I have implemented an interposer for open() and open64() system call. This interposer is implemented in interposer.c and I have compiled it in a shared library (libinterposer.so) using the following commands: gcc -g -fPIC -s -o interposer.o -c interposer.c gcc -s -g -shared -nostartfiles ... (0 Replies)
Discussion started by: Manish Mukherje
0 Replies

2. HP-UX

LD_PRELOAD on HP UX?

Hi , Is LD_PRELOAD supported on HP UX? I am having issues when i export the below export LD_PRELOAD=/usr/local/vertex/commtax_1.0.16/64bit/lib/libctq.so ldd /usr/local/vertex/commtax_1.0.16/64bit/lib/libctq.so /usr/lib/hpux64/dld.so: Unable to find library 'libodbc.so'. Killed Can... (2 Replies)
Discussion started by: psreddy1234
2 Replies

3. UNIX for Advanced & Expert Users

Preloading libraries.. LD_PRELOAD

well i know what LD_PRELOAD is. Now suppose i have hooked a function XDrawString in the my library (Mylib.so.1) and then used the command export LD_PRELOAD=/path/mylib.so.1 Now suppose i open Xeditor by typing 'xeditor' in the console, my library is geting used, so i knw that this applilcation is... (3 Replies)
Discussion started by: manchester
3 Replies

4. UNIX for Advanced & Expert Users

Declaring LD_PRELOAD system wide for dynamic loading

Dear Fellows; As being new to linux, i have tried to synamically load a custom library which overrides some system calls like conncet(), socket() etc.... for custom purposes. It works well, if declaring the environment path LD_PRELOAD and execution of the application to be override... (0 Replies)
Discussion started by: mzeeshan
0 Replies

5. Programming

LD_PRELOAD getting ignored .. can anyone tell me why ?

I had it working but i screwed up something and now i get me@mymachine:~$ LD_PRELOAD=/home/me/libf1.o ldd FCaller ERROR: ld.so: object '/home/me/libf1.o' from LD_PRELOAD cannot be preloaded: ignored. ERROR: ld.so: object '/home/me/libf1.o' from LD_PRELOAD cannot be preloaded: ignored. ERROR:... (3 Replies)
Discussion started by: NetworkLearning
3 Replies
ncad_addr(4)							   File Formats 						      ncad_addr(4)

NAME
ncad_addr - name of the Solaris Network Cache and Accelerator (NCA) socket utility library SYNOPSIS
/usr/lib/ncad_addr.so DESCRIPTION
ncad_addr.so is the Solaris Network Cache and Accelerator (NCA) socket utility library. Use this library with a web server to avoid support for the PF_NCA family type socket. The web server can take advantage of NCA functionality. Interpose the ncad_addr interfaces before the interfaces in libsocket by setting the environment variable LD_PRELOAD to ncad_addr.so so that it is preloaded before libsocket.so.1. The ncad_addr.so interfaces will be interposed only if NCA is enabled. See ncakmod(1). EXAMPLES
Example 1: Interposing ncad_addr Using Bourne shell syntax as an example, set LD_PRELOAD as shown below to interpose the ncad_addr socket utility libary: LD_PRELOAD=/usr/lib/ncad_addr.so /usr/bin/httpd FILES
/usr/lib/ncad_addr.so ncad_addr socket utility library shared object ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWncar (32-bit) | +-----------------------------+-----------------------------+ | |SUNWncarx (64-bit) | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
nca(1), ncab2clf(1), ncakmod(1), socket(3SOCKET), nca.if(4), ncakmod.conf(4), attributes(5) NOTES
Only applications that use the NCA feature, for example, web servers, should interpose this library. SunOS 5.10 18 Feb 2003 ncad_addr(4)
All times are GMT -4. The time now is 04:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy