X-Spam-Check-By: sourceware.org
X-IronPort-AV: i="3.99,317,1131339600";     d="scan'208"; a="148156259:sNHT26472526"
To: cygwin@cygwin.com, =?utf-8?Q?Ren=C3=A9?= Berber <r.berber@computer.org>
Subject: Re: executable = exe + data
Mail-Copies-To: never
Reply-To: sds@gnu.org
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
From: Sam Steingold <sds@gnu.org>
In-Reply-To: <dp2mt4$4ij$1@sea.gmane.org> (=?utf-8?Q?Ren=C3=A9?= Berber's  message of "Fri, 30 Dec 2005 01:16:52 -0600")
References: <uek3vqivg.fsf@gnu.org> <dp2mt4$4ij$1@sea.gmane.org>
Mail-Followup-To: cygwin@cygwin.com, =?utf-8?Q?Ren=C3=A9?= Berber  <r.berber@computer.org>
Date: Sat, 31 Dec 2005 18:22:29 -0500
Message-ID: <u1wzsrgwa.fsf@gnu.org>
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id jBVNNl7v014913

> * René Berber <e.oreore@pbzchgre.bet> [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
line...

I hoped that there is some other way to find out where the variable is
stored in the executable file.

Thanks!

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.honestreporting.com http://www.camera.org http://www.iris.org.il
http://www.memri.org/ http://www.jihadwatch.org/
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
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


