Mail Archives: djgpp/1997/02/26/08:16:49
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
- Raw text -