thanks leo -- it worked! i'm still going to keep my wrapper lib around though, just in case there are platforms where this dlfunc trick doesn't work. but that can easily be detected during configuration.
-jeff On Fri, 10 Sep 2004, Leopold Toetsch wrote: > Jeff Horwitz wrote: > > > 1. can you still dlopen the running image by passing a NULL string to loadlib? > > No. Didn't work that way, IIRC > > > 2. can you dlsym (via dlfunc) a statically linked function? > > Yes. Pass NULL for the library PMC: > > .sub main @MAIN > .local pmc nul > null nul > .local NCI f > .local pmc io > io = getstdout > f = dlfunc nul, "PIO_puts", "vIPt" > f(io, "Hello\n") > .end > > One caveat: currenty JITted NCI stub creation is currently turned off > and the code in src/nci.c seems to be unable to handle the "I" signature > for passing the interpreter as argument. > > > -jeff > > leo > >