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



Reply via email to