Path: utzoo!attcan!uunet!munnari!mimir!hugin!augean!idall From: idall@augean.OZ (Ian Dall) Newsgroups: comp.emacs Subject: Re: Portability problem with gnu-emacs Message-ID: <394@augean.OZ> Date: 16 Sep 88 03:01:12 GMT References: <441@myab.se> Reply-To: idall@augean.OZ (Ian Dall) Organization: Engineering Faculty, University of Adelaide, Australia Lines: 52 In article <441@myab.se> lars@myab.se (Lars Pensj|) writes: >This proposal has probably been mentioned before, but I have not seen it. > >Why is gnu-emacs implemented with the self dump feature? I know that >it speeds up the start-up, but it is extremly unportable. > >A suggestion: > >Let temacs write the compiled lisp code into a file 'code.c' in the following >format: > >char lisp_code[] = { >23, 45, 76, 93, -34, 45, >... >}; I think there might be a better way. The problem with this is that the compiled lisp ends up in .data. On BSD machines at least the .data section will not be shared so with multiple emacs users there will be multiple versions of the preloaded lisp in memory. (I think SysV avoids this problem by implimenting a copy on write scheme for the .data area but I could be wrong). Would it be possible to translate the preloaded lisp to C in the format of the lisp callable C functions already there. Eg: DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", "Exit the Emacs job and kill it. ARG means no query.\n\ If emacs is running noninteractively and ARG is an integer,\n\ return ARG as the exit program code.") (arg) Lisp_Object arg; { Lisp_Object answer; int i; . . . } This is of course a harder problem. Would there be fundamental restrictions on the allowable lisp code to do this? With the addition of dynamic linking this would also allow a true compiled E-lisp. >Some compilers even have a flag to put data in text area, which is >just what is wanted now. Does this flag have the side effect of making the .text area unsharable? If so it is not really the way to go. -- Ian Dall life (n). A sexually transmitted disease which afflicts some people more severely than others. idall@augean.oz