www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/12/19/01:31:06

Date: Thu, 19 Dec 1996 08:17:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>
cc: djgpp-workers AT delorie DOT com
Subject: strip reverts the stub to default
Message-ID: <Pine.SUN.3.91.961219080758.24763D-100000@is>
MIME-Version: 1.0

If you run `strip' on a .exe program, the stub info is reverted to  
default values.  This is BAD (IMHO), since people don't expect the 
program to change when you strip it.  I understand why is it happening 
(the stub is hard-coded inside the bfd library used by Binutils), but I 
submit that we should try to change the effect of this in the case of 
`strip'.

One thing I tried was to define STUB env var to point to the file that's
being stripped, so that the stub info would be read from it, but it seems
that the entire file, not only the stub part, is being read in this case. 
Is this correct, or am I missing something? 

Robert, can you please see if there's a simple way to prevent this from 
happening?  Thanks.

P.S.  You ask how did I know about this?  A user sent me a debug script 
which stepped through crt0 startup code in Emacs.  The script clearly 
shows that the stack is set at 256KB, while Emacs is stub-edited to have 
a 512KB stack when it is built.  At first, I thought that I goofed while 
creating the binary distribution, but then I recalled that I ran strip on 
the .exe instead of the COFF, as I usually do.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019