This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: executable = exe + data


> * 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]