Newsgroups: comp.os.minix
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!bronze!copper!templon
From: templon@copper.ucs.indiana.edu (jeffrey templon)
Subject: Hack Report (well not really) - fixing 'strip' on Mac
Message-ID: <1991Apr28.172029.5679@bronze.ucs.indiana.edu>
Sender: news@bronze.ucs.indiana.edu (USENET News System)
Organization: Indiana University, Bloomington IN.
Date: Sun, 28 Apr 91 17:20:29 GMT
Lines: 43


I had posted previously about stripping executables on the Mac, with
some confused ramblings about 'astrip' and 'strip'.  Turns out that
'strip' is the one I want, 'astrip' is for use with ACK .o files.

The problem with 'strip' is in a file a.out.h - there are some #defines
which are apparently flipped around from what they ought to be.
I have not yet figured out why this matters, as in strip.c they seem
to always be used in pairs.  But here is the patch, courtesy of Matthias
Pfaller.  After installing this patch and recompiling, strip works fine.
Note my version was compiled with c68, not ACK.

				Jeff
--------------------------------------------------
From: leo@krabat.marco.de (Matthias Pfaller)
Status: OR

I think your /usr/include/a.out.h is the pc-version. strip compiled on a
68000-system with an pc-a.out.h will behave as you have reported.
The following is a diff between the pc-version and the st-version.
	Hope that helps - Matthias

1a2
> /* This version is intended for the Atari ST */
7,8d7
< 	unsigned char	a_magic[2];	/* magic number */
< 	unsigned char	a_flags;	/* flags, see below */
10,11c9,10
< 	unsigned char	a_hdrlen;	/* length of header */
< 	unsigned char	a_unused;	/* reserved for future use */
---
> 	unsigned char	a_flags;	/* flags, see below */
> 	unsigned char	a_magic[2];	/* magic number */
13a13,14
> 	unsigned char	a_unused;	/* reserved for future use */
> 	unsigned char	a_hdrlen;	/* length of header */
27,28c28,29
< #define A_MAGIC0	(unsigned char) 0x01
< #define A_MAGIC1	(unsigned char) 0x03
---
> #define A_MAGIC0	(unsigned char) 0x03
> #define A_MAGIC1	(unsigned char) 0x01

