Subject: A placebo for ELF strip
To: None <port-pmax@NetBSD.ORG>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 07/10/1995 12:07:36
The following script works for me. It's noisy because it doesn't
entirely emulate strip; it still leaves global symbols in the
ELF file.  It does reduce the size of binaries by approximately
a factor of two.  That makes building a user-land (and snapshots)
almost comparable to using a.out format.  The libraries  and
linked-but-uninstalled binaries are still _huge_ by comparison
to a.out.

(I'd use objcopy -S but that has a bug, too.)


I just symlink /usr/bin/strip to this script, and change 
/usr/src/usr.bin/Makefile to avoid making toolchain binaries,
just like the Alpha.

User-land snapshot coming RSN :)

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/bin/strip.elf
#
echo x - /usr/bin/strip.elf
sed 's/^X//' >/usr/bin/strip.elf << 'END-of-/usr/bin/strip.elf'
X#!/bin/sh
X## caues buggy binaries
X#objcopy -S $1
Xecho "(emulating strip $1)"
Xobjcopy -gx $1
END-of-/usr/bin/strip.elf
exit