Yes, this is possible. GNU Emacs does this to optimize its startup time. It loads a bunch of Lisp files to produce an image and then dumps a core which can be restarted.
Several years ago, I created a patch for GNU Make 3.80 to do exactly the same thing (using code borrowed from GNU Emacs).
With this patch, you have a new option in make: make --dump
. The utility now reads your Makefile
, and then instead of executing the rules, it produces a core dump which can be restarted to do the actual build (evaluation of the parsed rule tree).
This was a saving, because the project was so large that loading all of the make rules across the source tree took thirty seconds! With this optimization, incremental builds launched almost instantly, without the half minute startup penalty.
No kernel support is required for this. What is required is knowledge about the structure of the core file.
In addition to this approach, there was a process checkpointing project for Linux many years ago (wonder what happened to that).