Comment 1 for bug 794713

Revision history for this message
Faré (fahree) wrote :

rtoy explains:

"Fred came up with the original idea, but at the time he only knew how to
do it by creating a custom linker script. I talked to him about it and
figured out gcc with a few special arguments would do the same thing.
That allowed me to extend the idea to work on solaris/sparc and even Mac
OS X.

The C side of the stuff is in src/lisp/elf.c and src/lisp/mach-o.c and
src/lisp/save.c, with a little bit of help from the lisp side in
src/code/save.lisp. elf.c and mach-o.c dump the three spaces into valid
elf or mach-o object files.

The script that does the linking is src/tools/linker.sh. It takes the
arguments created by save.c and does the right thing on the various
supported architectures and calls gcc in the right way to tell the
executable that an image is attached and to append the three spaces onto
the end of the C executable."

NB: the current way to checkout CMUCL, not well documented, is:
cvs -d common-lisp.net:/project/cmucl/cvsroot checkout src