Date: Mon, 18 Dec 1995 17:36:27 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: hlew@genome.Stanford.EDU (Howard Lew) Cc: gpalmer@westhill.cdrom.com, terry@lambert.org, questions@FreeBSD.ORG Subject: Re: undump program Message-ID: <199512190036.RAA13127@phaeton.artisoft.com> In-Reply-To: <Pine.SUN.3.91.951218134608.26921B-100000@vegemite.Stanford.EDU> from "Howard Lew" at Dec 18, 95 02:12:47 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Here's the whole rationale for what I want to do: > 1) Take a long perl program > 2) Intentionally dump the perl program to become an executable binary > 3) Run the binary at a later time You should note that this will only save on the state precalculation for the interpreter. That is, it will allow you to be lazy about precalculating information that you precaclulate in perl instead of doing so outside of perl and updating your actual perl code appropriately. It will not "compile" the perl program to a "binary". It will make a copy of the existing perl interpreter, and fill out some auto data (including the default stack an PC). There is no significant advantage to this approach over restructuring your perl script based on splitting the precaclulation out to allow you to execute it only once and hard-code the results in the perl script. The resulting "binary" will run at the same speed. The one potential advantage, "copy protection", is lost if anyone wants to take the trouble to take the core image data sections vs. a "standard" perl binary, and dump them out. That is, the amount of effort to "crack" this is similar to the amount of effort necessary to make "undump" work. I believe the emacs "unexec" works on FreeBSD, or did last time I looked. You can get the same functionality by using that instead (as has been suggested by others), if you don't want to hassle with doing a port of "undump". This may be mildly useful for a perl program that was written such that it's hard to update modularly to take advantage of seperate precalculation; IMO, I'd rather fix the perl program than make the undump work. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512190036.RAA13127>