[Openmcl-devel] create an executable from openmcl

Gary Byers gb at clozure.com
Thu Apr 17 11:26:33 PDT 2003

On Thu, 17 Apr 2003, Erann Gat wrote:

> On Thu, 17 Apr 2003, Gary Byers wrote:
> > As far as making a "minimal" adder.image ... it's strange to hear
> > myself say this, but I think that the modularity and infrastructure
> > and other issues (packaging, distribution) are way more important.
> > There are certainly arguments that suggest that a 5MB ADD3 program is
> > somewhat excessive, but if it's a -really good- ADD3 program most
> > people wouldn't care that it happens to have a (mostly unused) CL
> > implementation in it.  Would they ?
> I don't know how viable a suggestion this is, but CLisp has a cute hack
> where you can chmod +x a .fasl file and will automagicaly do the right
> thing.  I think the way it's done is that .fasl files have #!/bin/clisp
> prepended to them, and then the CLisp executable has startup code that
> does the Right Thing when passed a .fasl file as a startup argument.
> Seems like something like this shouldn't be too hard to do.
> E.

On a slightly-related note: the 'header' which describes the layout
of an OpenMCL memory image is actually a 'trailer': it's at the end
of the file.  As long as one is careful to observe certain alignment
constraints (or uses tools that observe them for you), you can prepend
pretty much anything to the front of a heap image (such as a shell
script that calls the kernel with its own pathname as an image file
argument or, in theory at least, the kernel itself.)

Somewhere or other I have some code that does this and some examples
of how it can be used; I'll try to find it and post it somewhere.

Openmcl-devel mailing list
Openmcl-devel at clozure.com

More information about the Openmcl-devel mailing list