Subject: bin/10067: strip -K fails
To: None <>
From: John Hawkinson <>
List: netbsd-bugs
Date: 05/07/2000 23:46:10
>Number:         10067
>Category:       bin
>Synopsis:       strip -K fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 07 23:47:00 PDT 2000
>Originator:     John Hawkinson
>Release:        NetBSD-1.4 as well as -current
System: NetBSD 1.4.2 NetBSD 1.4.2 (ZORKMID) #101: Wed Apr 19 22:29:43 EDT 2000 i386

	strip -K fails to preserve symbols when run on a.out-i386-netbsd;
it appears to just strip all symbols.

	objcopy -S seems to fail similarly; it's not clear what
the interaction between -K and "strip-all" is supposed to be, however.

	Mycroft reports this fails under -current with ELF as well.
	strip -K _pcic_isa_alloc_mask /netbsd
	nm /netbsd

Observe no symbols.
	A workaround appears to be to use objcopy, i.e.
	objcopy --strip-unneeded -K _pcic_isa_alloc_mask /netbsd

	Err, it seems that strip has a --strip-unneeded flag as well.
	Perhaps that's necessary as well.

	I guess it could be argued that this behavior is intentional,
	but if so, the docs should probably be clarified. But it sure
	seems that -K should imply --strip-unneeded or suchlike.