This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Alternative to LD_PRELOAD


Hi All,

I am looking for an alternative to LD_PRELOAD 
functionality. My application is "setuid root" and 
hence I can not use LD_PRELOAD. Is there any other 
way by which I can force preloading a shared library
(say liba.so) when I start the application? 

My application is already linked with another shared 
library (say libb.so). So can I combine libb.so with 
liba.so using ld or gcc, so that both library code 
gets loaded when the application is executed?

I tried the following. But it doesn't work. 

gcc -shared -Wl,-soname,libb1.so -o libb1.so.1.0.1 
-Wl,--whole-archive libb.so liba.so 
-Wl,--no-whole-archive -lc

Thanks in advance,
Arvind. 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]