Emacs, portable?
Emacs, portable?
Posted Jun 30, 2023 13:13 UTC (Fri) by repetitivestrain (guest, #165872)In reply to: Emacs, portable? by mirabilos
Parent article: Emacs for Android
If the C library malloc does not support the necessary features to use unexec, Emacs arranges for its own malloc to be built and used prior to the dumping process. Of course, Emacs 27.1 defaults to using a more portable dumper, which stores objects as offsets from a ``basis'' variable in the bss instead of writing the entire heap to a new executable image.
Neither pieces of system specific code have ever proven an obstacle to porting Emacs, which currently supports over 17 kinds of CPU on operating systems ranging from GNU and Unix to MS-DOS. In the past, Emacs also supported VMS on Alpha and the VAX. And evidently Emacs is not the only program that requires dumping code: Solaris systems even include an officially sanctioned implementation of unexec, dldump, which works precisely the way Emacs expects it to.