Subject: toolchain/15387: strip(1) -d doesn't work
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/27/2002 16:19:57
>Number:         15387
>Category:       toolchain
>Synopsis:       strip(1)'s -d flag doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 26 21:21:00 PST 2002
>Originator:     Luke Mewburn
>Release:        NetBSD 1.5ZA
Luke Mewburn  <>
Luke Mewburn     <>
Wasabi Systems - NetBSD hackers for hire
NetBSD - the world's most portable UNIX-like operating system
System: NetBSD 1.5ZA NetBSD 1.5ZA (ARGO) #0: Tue Jan 22 11:21:31 EST 2002 lukem@hippolyte:/var/scratch/obj.i386/sys/ARGO i386
Architecture: i386
Machine: i386
	strip(1)'s man page and usage documents "-d" as a synonym for "-g"
	to strip debug symbols from a file, but it doesn't work.
	-> cp /usr/mdec/biosboot.sym /tmp

	-> size /tmp/biosboot.sym
	text    data    bss     dec     hex     filename
	40440   4640    14004   59084   e6cc    /tmp/biosboot.sym

	-> ls -la /tmp/biosboot.sym
	-r--r--r--  1 lukem  wheel  213590 Jan 27 16:17 /tmp/biosboot.sym

	-> strip -d /tmp/biosboot.sym
	Usage: strip <switches> in-file(s)
	 The switches are:
	  -I --input-target <bfdname>      Assume input file is in format <bfdname>
	  -O --output-target <bfdname>     Create an output file in format <bfdname>
	  -F --target <bfdname>            Set both input and output format to <bfdname>
	  -p --preserve-dates              Copy modified/access timestamps to the output
	  -R --remove-section <name>       Remove section <name> from the output
	  -s --strip-all                   Remove all symbol and relocation information
	  -g -S -d --strip-debug           Remove all debugging symbols
	     --strip-unneeded              Remove all symbols not needed by relocations
	  -N --strip-symbol <name>         Do not copy symbol <name>
	  -K --keep-symbol <name>          Only copy symbol <name>
	  -x --discard-all                 Remove all non-global symbols
	  -X --discard-locals              Remove any compiler-generated symbols
	  -v --verbose                     List all object files modified
	  -V --version                     Display this program's version number
	  -h --help                        Display this output
	  -o <file>                        Place stripped output into <file>
	strip: supported targets: elf32-i386 a.out-i386-bsd a.out-i386-netbsd pe-i386 pei-i386 coff-i386 a.out-i386-linux elf32-little elf32-big srec symbolsrec tekhex binary ihex netbsd-core
	Exit 1

	-> strip -g /tmp/biosboot.sym

	-> size /tmp/biosboot.sym
	text    data    bss     dec     hex     filename
	40440   4640    14004   59084   e6cc    /tmp/biosboot.sym

	-> ls -la /tmp/biosboot.sym
	-r--r--r--  1 lukem  wheel  58055 Jan 27 16:17 /tmp/biosboot.sym

	left as an exercise for the toolchain gurus