From owner-freebsd-current Mon Dec 7 12:06:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA09669 for freebsd-current-outgoing; Mon, 7 Dec 1998 12:06:22 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ceia.nordier.com (m2-22-dbn.dial-up.net [196.34.155.86]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA09398 for ; Mon, 7 Dec 1998 12:05:54 -0800 (PST) (envelope-from rnordier@nordier.com) Received: (from rnordier@localhost) by ceia.nordier.com (8.8.7/8.6.12) id WAA29135; Mon, 7 Dec 1998 22:02:34 +0200 (SAT) From: Robert Nordier Message-Id: <199812072002.WAA29135@ceia.nordier.com> Subject: Re: strings - elf vs aout In-Reply-To: <199812071728.KAA02857@mt.sri.com> from Nate Williams at "Dec 7, 98 10:28:41 am" To: nate@mt.sri.com (Nate Williams) Date: Mon, 7 Dec 1998 22:02:29 +0200 (SAT) Cc: rnordier@nordier.com, syssgm@dtir.qld.gov.au, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nate Williams wrote: > > > There's an annoying anomaly in the new version of strings. The traditional > > > version specifically included tabs as valid characters for strings, while > > > the new one doesn't, leading to: > > > > > > $ printf 'My dog has\tno nose' > foo > > > $ strings -aout foo > > > My dog has no nose > > > $ strings -elf foo > > > My dog has > > > no nose > > > $ > > > > > > I run "strings" on lots of files (eg frobnoz.doc), not just executables. > > > This is irritating me specifically in regard to the INCLUDE_CONFIG_FILE > > > kernel compile option which now requires "strings -aout" to recover the > > > config file. > > > > > > Shall I devise and commit a fix for this behaviour? > > > > If you want to do this, I'd suggest making it an option. Current > > standards, such as the Single UNIX Specification, apparently regard a > > printable string as 4 or more isprint(3) chars followed by '\n' or > > '\0'. > > Then 'strings' for ELF is broken, since \t is not a newline of end of a > string, and Steven's comments are valid. Reverting to the traditional approach would be a double-step from strict SUS conformance, as well as a single step away from standard GNU binutils behavior. However, if the consensus is that these issues are of little importance or relevance, I wouldn't object particularly. -- Robert Nordier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message