I'm trying to LD_PRELOAD a library that in turn uses ldopen.
this works OK, as long as I don't try to run (with LD_PRELOAD
set) any binaries that use libdl themselves.

Should this be possible? If so, what am I doing wrong?


$ cat libfoo.c 
#include <dlfcn.h>
void foo(){
  void *handle=handle = dlopen("/lib/libc.so.6", RTLD_LAZY);
  dlclose(handle);
}

$ gcc -shared -Wl,-soname,libfoo.so.0 -o libfoo.so.0.0 -fPIC libfoo.c -ldl

$ export LD_PRELOAD=./libfoo.so.0.0 
$ bash  
bash: can't resolve symbol '_dl_open'
bash: can't resolve symbol '_dl_close'
bash: can't resolve symbol '_dl_catch_error'
$ ls -d .
./


Thanks.

-- 
joost witteveen, [EMAIL PROTECTED]
#!/usr/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
#what's this? see http://www.dcs.ex.ac.uk/~aba/rsa/


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to