This is the mail archive of the
mailing list for the Cygwin project.
Re: executable = exe + data
- From: Sam Steingold <sds at gnu dot org>
- To: cygwin at cygwin dot com, RenÃ Berber <r dot berber at computer dot org>
- Date: Sat, 31 Dec 2005 18:22:29 -0500
- Subject: Re: executable = exe + data
- References: <firstname.lastname@example.org> <email@example.com>
- Reply-to: sds at gnu dot org
> * RenÃ Berber <firstname.lastname@example.org> [2005-12-30 01:16:52 -0600]:
> Sam Steingold wrote:
>> the only idea I have had so far is this:
>> char string="this is a buffer into which I will be writing my stuff";
>> size_t my_length = atol(string);
>> and then have a post-processor edit lisp.exe and replace the contents of
>> string with the actual lisp.exe file length (I need the long initial
>> junk there so that the post-processor will be able to find where it is to
>> write the length).
> The steps would be something like:
> 1. Compile program, say "gcc -mwindows h.c -o h";
> 2. Record file size;
> 3. Concatenate program and data, say "cat h.exe h.data > longh.exe";
> 4. Run through post-processor (with longh.exe and size as parameter).
so, the only reasonable way is to search the executable for the magic
I hoped that there is some other way to find out where the variable is
stored in the executable file.
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.honestreporting.com http://www.camera.org http://www.iris.org.il
Despite the raising cost of living, it remains quite popular.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html