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)

to get around this, i've written a separate shared object that wraps the
apache API functions that i want to call from parrot.  i call those via
NCI, and it works like a charm.

so, my questions:
1. can you still dlopen the running image by passing a NULL string to loadlib?
2. can you dlsym (via dlfunc) a statically linked function?

if it turns out i CAN'T access the statically linked functions, i'll keep
the wrappers around, but i don't want to get too deep into it without
making sure first!

-jeff

Reply via email to