From: wanpsm98 AT octarine DOT cc DOT adfa DOT oz DOT au (WANKADIA PAUL SAPAL MICHAEL) Newsgroups: comp.os.msdos.djgpp Subject: Re: Executables with added data. Date: 16 May 98 05:58:39 GMT Lines: 16 Message-ID: References: NNTP-Posting-Host: 131.236.253.20 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk "Paul Derbyshire" writes: >Using DJGPP (but not Allegro) is there a simple way to add an arbitrary chunk >of binary data after the DJGPP exe, and have it available for read/write as if >it were a file? Is there some sort of pointer in the exe to the end to allow a >simple seek to the start of the added data (if any) and read/write data there? Check the default ld script for the symbol that marks the end of the COFF image: it's 'end' or '_end' (or both), IIRC. You'd probably just declare it as an 'extern int' (the datatype doesn't matter) and then take the address of it with '&'; however, keep in mind that the compiler will automatically prefix the declared variable name with an underscore (as, of course, you already know). I had to use this for PUNIX, in order to calculate some memory-related values; however, I think I did it with ASM (or inline ASM).