lli external functions

I find the behavior of lli (in --force-interpreter mode) rather strange when calling external
functions. Currently if a function has not been defined in the internal "known external"
function table it just tries to resolve the symbol and cast it to its generic external function
type.

Is this really the intended behavior? This is most likely to cause the interpreter to crash
without warning when it calls the function. The only use case seems to be if a user wants
to explicitly extend the interpreter by providing a loadable module of functions that expect
to be called in this fashion, but that doesn't seem very common (and is undocumented?).
It seems like it would make more sense for the interpreter to just give up and report an
error to the user (or at least give a warning that it is calling into arbitrary binary code).

In any case, it seems like lli should know how to call memmove. Patch attached.

- Daniel

lli-memmove-support.patch (1.24 KB)

I find the behavior of lli (in --force-interpreter mode) rather strange when calling external
functions. Currently if a function has not been defined in the internal "known external"
function table it just tries to resolve the symbol and cast it to its generic external function
type.

Is this really the intended behavior? This is most likely to cause the interpreter to crash
without warning when it calls the function. The only use case seems to be if a user wants
to explicitly extend the interpreter by providing a loadable module of functions that expect
to be called in this fashion, but that doesn't seem very common (and is undocumented?).
It seems like it would make more sense for the interpreter to just give up and report an
error to the user (or at least give a warning that it is calling into arbitrary binary code).

I think this is the acceptable behavior for an interpreter which does not make use of OS facility. Known functions are added on demand.

In any case, it seems like lli should know how to call memmove. Patch attached.

Thanks. I'll apply.

Evan