The --strip-all case is out of question, but my concern is primarily
with the combination of --strip-symbol/--strip-symbols and -w, but to
some degree also with the plain use of --strip-symbol/--strip-symbols:
When trying to cut down the number of symbols in the linux kernel
(subject to kallsyms lookup) I'm trying to eliminate all non-text
symbols. Finding them is not a problem, but filtering out those used in
relocations is, which is why I'd want objcopy to do this for me. Since
I'm of the general opinion that --strip-symbol for symbols used in
relocations for non-discarded sections (which I would hope already don't
get the BSF_KEEP flag set) will result in a broken output file, I'd like
to make objcopy smart enough to deal with that situation (possibly
through a new option --keep-needed or --force-strip-needed, depending on
what the desirable default would be and whether keeping the current
behavior is a requirement).