okay, i'm bringing back a thread from a year ago. for mod_parrot, i'd like to be able to loadlib the running process image (httpd) and dlfunc the various apache API functions. however, while this works for libc functions, and any other functions from shared libraries, it appears not to work for those statically linked into the binary. in fact,
loadlib self_lib, nullstring dlfunc func, self_lib, "ap_rputs", "ptv"
will reliably segfault on my box (RHEL 3.0)
I think the problem here is that you need to pass a NULL into dlopen for the filename to get the main image, not a null string. (Though that segfault's pretty unpleasant -- could you enable coredumps and see what the backtrace looks like?) Try doing:
null $S0 loadlib self_lib, $S0
and see if it works better.
If this doesn't work then we'll track things down more to see why. -- Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk