Date: Wed, 26 Feb 1997 14:56:44 +0200 (IST) From: Eli Zaretskii To: Aubrey Millard cc: djgpp AT delorie DOT com Subject: Re: Size of .exe Why so BIG??? In-Reply-To: <33136158.7725@golden.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 25 Feb 1997, Aubrey Millard wrote: > Try running "strip". Just type strip foo.exe or whatever your program I would like to point out that the current version of `strip' has a known bug/misfeature when you run it on a .exe file: it replaces the stub prepended to the program by its own stub hard-coded inside `strip'. Thus, if the original program was stub-edited to change, e.g. the size of the transfer buffer or the maximum stack size, you lose those changes when you strip the .exe. Also, the stub embedded inside `strip' is an old, pre-v2.01 stub; in particular, it exhibits the bug with the empty PATH, and its diagnostics in case of load errors is less extensive. Work-around? Run strip on raw COFF file, then prepend the stub to it: gcc -o foo foo.c bar.c ... strip foo stubify foo or gcc -s -o foo foo.c bar.c ... stubify foo If you already have foo.exe, convert to COFF first: exe2coff foo.exe strip foo stubify foo del foo