🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1732

[eliot@mgm.mit.edu: bug in strip.c under COFF encapsulation]

#1732
From: rms
Date: Mon, 12 Feb 1990 01:04
30 lines
1283 bytes
Return-Path: <eliot@mgm.mit.edu>
Date: Sun, 11 Feb 90 15:38:42 EST
From: eliot@mgm.mit.edu (Eliot Dresselhaus)
To: rms@ai.mit.edu
Subject: bug in strip.c under COFF encapsulation

When strip finally writes out the a.out header under COFF
encapsulation it stomps on the COFF header.  The lseek (input_desc, 0, 0)
below assumes the a.out header starts the file; this is untrue under
COFF encapsulation.  The obvious fix is:

*** strip.c~	Thu Jan 26 13:55:28 1989
--- strip.c	Mon Nov  6 12:27:06 1989
***************
*** 624,629 ****
--- 624,632 ----
    entry->header.a_syms = nsyms * sizeof (struct nlist);
  
    lseek (input_desc, 0, 0);
+ #ifdef COFF_ENCAPSULATE
+   lseek (input_desc, _N_HDROFF (entry->header), 0);
+ #endif
    write (input_desc, &entry->header, sizeof (struct exec));
  
    free (strtab_vector);


---
Eliot
eliot@mgm.mit.edu
Technical Details
Message-ID: <9002120104.AA10920@sugar-bombs.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!AI.MIT.EDU!rms

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!AI.MIT.EDU!rms
From: rms@AI.MIT.EDU
Newsgroups: gnu.utils.bug
Subject: [eliot@mgm.mit.edu: bug in strip.c under COFF encapsulation]
Message-ID: <9002120104.AA10920@sugar-bombs.ai.mit.edu>
Date: 12 Feb 90 01:04:40 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 30