Re: Linking scripts and interpreters into an executable

Ray Pereda <rpereda@ringer.cs.utsa.edu>
10 Aug 1998 10:10:04 -0400

          From comp.compilers

Related articles
Linking scripts and interpreters into an executable jkahrs@castor.atlas.de (Juergen Kahrs) (1998-07-30)
Re: Linking scripts and interpreters into an executable rpereda@ringer.cs.utsa.edu (Ray Pereda) (1998-08-10)
Re: Linking scripts and interpreters into an executable Juergen.Kahrs@t-online.de (1998-08-10)
Re: Linking scripts and interpreters into an executable bob@netwrench.com (1998-08-13)
Re: Linking scripts and interpreters into an executable dan@control.com (1998-08-13)
Re: Linking scripts and interpreters into an executable aeb@saltfarm.bt.co.uk (Tony Bass) (1998-08-16)
Re: Linking scripts and interpreters into an executable jkahrs@castor.atlas.de (Juergen Kahrs) (1998-08-17)
| List of all articles for this month |

From: Ray Pereda <rpereda@ringer.cs.utsa.edu>
Newsgroups: comp.compilers
Date: 10 Aug 1998 10:10:04 -0400
Organization: Compilers Central
References: 98-07-238
Keywords: interpreter

On Thu, 30 Jul 1998, Juergen Kahrs wrote:


> not have an option for (statically) linking scripts (shell, AWK, Perl)
> together with their interpreters into an executable.
>
> Does anyone know of a linker which can do this ?


I have not seen explicit support for this kind of feature but I think
it is much needed. Most executable file formats have a non-executable,
non-program data section. I would dump the script in there.


> +----------- http://home.t-online.de/home/Juergen.Kahrs/ -------------+
> [It's not just a linker you need, you'd also need a version of the
> language interpreter that was prepared to read from strings in the
> program. But it sounds like a rather peculiar thing to do with little
> practical benefit. -John]


I don't think it is that peculiar. Clint Jeffery and I hacked up a
way to combine the Icon interpeter and a source file so that we could
have one executable for easy distribution of binaries. The solution
was basically to just have a special copy of the interpreter that seeks
for a special marker where the executable ends, and the source script
is appended to file. We did not even bother try to put the code in a
debug section or something of the kind.


The perl people have a program that creates standalone executable
perl programs. When I asked the author what was his technique he
said that he did not want to make it public. Bastud.


-Ray Pereda
Univ. Texas @ San Antonio
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.