Unicode security
Nick Clifton
nickc@redhat.com
Fri Jan 21 15:55:34 GMT 2022
Hi Reini,
> now to binutils:
> nm arabic-1.o
> U __assert_fail
> 0000000000000010 T main
> 0000000000000000 T الإء
> 0000000000000000 B
>
> of course, as utf-8 chars are kept asis. the exported functions can include
> homoglyphs and if so will display all variants asis, and without unicode
> tools you'll have no idea which is what.
Just to note that the latest binutils sources include an option to display
unicode characters as esacpe sequences or hex bytes, so that they can be
more easily detected:
% nm -Ux arabic-1.o
U __assert_fail
000000000000000c T main
0000000000000000 T <0xd8a7><0xd984><0xd8a5><0xd8a1>
0000000000000000 B <0xd8a7><0xd984><0xd986><0xd8a7><0xd8b3>
% nm -Ue arabic-1.o
U __assert_fail
000000000000000c T main
0000000000000000 T \u0627\u0644\u0625\u0621
0000000000000000 B \u0627\u0644\u0646\u0627\u0633
There is even an option to highlight unicode characters so that they stand
out even more, but this only works when the tool is run in terminal that
supports colour escape sequences.
Cheers
Nick
More information about the Binutils
mailing list