[PATCH 0/4] binutils: UTF-8 improvements

Alice Carlotti alice.carlotti@arm.com
Thu Sep 25 17:56:08 GMT 2025


The first three patches in this series form a substantial refactor of the UTF-8
handling code in strings.c, with some fixes included in patch 2/4.

Following discussion between us, Andrew Aitchison indpendently posted another
patch series [1] that affects strings.c; my patch 2/4 includes equivalent
changes as part of a more extensive patch.  Unlike this patch series, Andrew's
patches also make improvements to nm, objdump and readelf, and updates the
documentation for all four utilities accordingly.

Patch 4/4 addresses the complete lack of test coverage, based upon an earlier
incomplete patch from Nick Clifton.  I am satisfied that the new tests provide
good coverage of the UTF-8 handling code in strings.c, but I am unsure what
would be the desired output in some cases for the other utilities.  To
facilitate future test improvements for nm, objdump and readelf, I have
provided a test input file for these utilities with placeholder checks;
hopefully someone else can build upon this to provide proper test coverage.

Note that the test file unicode-symbols.s patch 4/4 includes byte sequences
that aren't valid UTF-8.  I'll include a plaintext representation of these in
the email.

Is this series OK for master? 

(Apologies to Andrew for the conflict/overlap with your changes.  I wrote most
of this series before seeing your latest patches, but it should be simple
enough to drop or replace the strings.c changes in your patch, depending on
which series lands first.)


[1] https://sourceware.org/pipermail/binutils/2025-September/144233.html


More information about the Binutils mailing list