Alternative to LD_PRELOAD
arvind k
arvind_000@yahoo.com
Thu Jun 1 09:18:00 GMT 2006
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
More information about the Binutils
mailing list