Commit: Add support for displaying unicode characters

Nick Clifton nickc@redhat.com
Mon May 9 16:26:39 GMT 2022


Hi Fangrui,

> I just learned that this patch added -U as an alias for --unicode. In
> macOS nm and llvm-nm, -U is an alias for --defined-only.
> --defined-only seems much more useful than --unicode. I wonder if it
> is too late to redefine -U as --defined-only...

No, it could be changed.  I have to say that I would have thought that -d
was a better choice for the short version.  But anyway.

Before making the change however, I thought that it would be best to check
to see if there are any other inconsistencies and I did find a couple:

   * nm uses -s as the short version of --print-armap, whereas llvm-nm uses -M.
   * nm uses -V as the short version of --version, whereas llvm-nm does not have one.

The support/lack of -V does not strike me as important, and it should be a simple
matter to add -M as another short-version of --print-armap, so unless you have
any objections I will create a patch to change -U and add -M.

Cheers
   Nick

PS. I also saw that llvm-nm has a -W/--no-weak option which is missing from nm.
Is there a binutils PR filed to add this feature ?



More information about the Binutils mailing list