Commit: Add support for displaying unicode characters

Fangrui Song i@maskray.me
Tue May 10 04:21:41 GMT 2022


Hi Nick,

Thanks for the reply and openness to make tools more compatible!
(even when llvm-nm made some coordination mistakes...)

On 2022-05-09, Nick Clifton wrote:
>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.

-M seems more like a llvm-nm problem and I believe it is almost unused.
I think llvm-nm folks should think how to handle the -s conflict with
macOS. nm probably should not be bothered with this llvm-nm problem.
I think -M can be used for possibly more useful options in the future.

>  * nm uses -V as the short version of --version, whereas llvm-nm does not have one.

The latest version of llvm-nm has -V: https://llvm.org/docs/CommandGuide/llvm-nm.html
Having -V as an alias for --version seems a convention for quite a few
utilities.

>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.

Thanks! Having -U for --defined-only will be great.

>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 ?

Thanks for noticing this.  I just filed one: https://sourceware.org/bugzilla/show_bug.cgi?id=29135 :)
Having -W/--no-weak will be great, too.


More information about the Binutils mailing list