Greetings,


~       if (!orig_fopen)
~               orig_fopen = dlsym(RTLD_NEXT, "fopen");
~ 
~ should do what you want.  (RTLD_NEXT isn't documented in the dlsym
~ manpage, just in <dlfcn.h>, which says
~ 
~ /* If the first argument of `dlsym' is set to RTLD_NEXT the run-time
~    address of the symbol called NAME in the next shared object is
~    returned.  The "next" relation is defined by the order the shared
~    objects were loaded.  */
~ #define RTLD_NEXT       ((void *) -1l)
~ )
~ 
so If I would load say 3 libraries ahead, which would have the same
routines defined, I will get them in back-order the libraries were loaded,
by calling dlsym(RTLD_NEXT,"routine")  3 times. Sounds neat to me. Thanks
for the hints.




--
[EMAIL PROTECTED]           http://www.kalug.lug.net

Reply via email to