This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Alternative to LD_PRELOAD
- From: arvind k <arvind_000 at yahoo dot com>
- To: binutils at sourceware dot org
- Date: Thu, 1 Jun 2006 02:18:45 -0700 (PDT)
- Subject: 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