This is the mail archive of the
mailing list for the binutils project.
strings should be dumb
- From: Greg Alexander <bugreg at galexander dot org>
- To: binutils at sourceware dot org
- Date: Mon, 27 Oct 2014 13:13:25 -0400
- Subject: strings should be dumb
- Authentication-results: sourceware.org; auth=none
It has come to my attention that strings is smart. strings should be
dumb. The default behavior should be changed to the behavior when -a is
specified today. The datasection_only behavior should be eliminated
entirely. strings should not link against bfd.
I'm sick and fucking tired of GNU utilities sucking due to an inability
to reject extraneous and wrong features. The security implications are
the least of it. No one wants strings to be smart. When you run strings
on an ELF object, you expect to get strings from the symtab and headers
as well. That is not a failure of strings -- it serves a different
purpose than objdump does! Every utility does not want to grow until it
becomes objdump! Don't be emacs! Don't be gcc!
Consider the man page:
For each file given, GNU strings prints the printable character
sequences that are at least 4 characters long (or the number given
with the options below) and are followed by an unprintable character.
By default, it only prints the strings from the initialized and loaded
sections of object files; for other types of files, it prints the
strings from the whole file.
The first sentence describes how people expect strings to operate.
Rather than elaborating on the first sentence, the second sentence
CONTRADICTS it. That is wrong.
I'll happily submit a patch to fix strings, if such would be accepted.
Have a nice day.