Mail Archives: djgpp/1995/10/30/22:58:48
Date: Fri, 27 Oct 1995 14:46:20 --200
From: sorinb AT sky DOT dsp DOT pub DOT ro (Balea Mihai Sorin)
I was playing around with djgpp 1.12m4 ( gcc 2.6.3 ) when I noticed
something
quite strange. The resulting COFF file was different, although I compiled
the same source file ( about 30 lines long ) under *the same* conditions (
meaning the same command line and the same environment ).Further browsing of
The COFF header contains compile time so cmp or comp will report a difference
anytime the source is recompiled.
the output revealed even stranger things. The end of COFF file was filled
with a lot of apparently unnecessary stuff like functions identifiers and
assembly labels. Even worse : in some cases I found a partial copy of my
directory tree and/or pieces of C source. Worth mentioning : my program
behaves identically each time I build it. And also, I did not include any
debug info !
Some of this is symbol table space and basic debug records, the rest is slack
space at the end of the file filled with garbage either from disk or from
memory. DJGPP does not null fill the file out to the next sector boundary. In
any case this is not loaded into memory when the .exe is read so, of course,
this garbase has no effect on your run-time behavior.
Is there anyone who can tell me why this happens and how it can be stopped
( if possible ) ?
Is there any on line description of COFF file format ? I wonder if an
executable file compressor ( something like PKLITE or LZEXE ) would be
possible
( I'm not sure if protected mode allows it ).
Thanks in advance !
--
Art S. Kagel, kagel AT ts1 DOT bloomberg DOT com
Variety is the soul of pleasure. -- Aphra Behn
- Raw text -