validity of foreign functions across saved images

"Hoehle, Joerg-Cyril" <[email protected]> Wed, 27 Mar 2002 14:47:30 +0100
Newsgroups gmane.lisp.uffi.general
Message-ID <[email protected]>
Hi,

I wrote:
> So my hope is that an interface can be discovered(!) as soon 
> as possible that eliminates the need for the low-level 
> interface. I haven't yet found an end in this area.

For example, currently I'm thinking about ways to provide an API about how to revalidate foreign functions after being restarted from an ancient image.

The thing is,
(DEF-ALIEN-ROUTINE #)
(DEF-CALL-OUT #)
etc. all presuppose that the (C) function is already known somehow (e.g. shared library is open at time these forms are evaluated).

What is when you once evaluated these forms, saved your image and restart from that saved image? Probably a crash. How to address this portably?


CLISP's module concept solves this at the cost of not being able to dynamically call any function, which I find not acceptable. Only the functions in the binary are known(!).

Using CMUCL, we managed to build images which had an :INIT-FUNCTION so as to reload a foreign object file at the same address as previously, and perhaps load the actual definitions only then, with just a package stub in the image (I cannot exactly remember what I did >5 years ago). So it was a "mostly complete" image, and not really a restart, rather than a "prepare image with foreign functions".

Comments welcome,
	Jorg Hohle.