[binutils-gdb/binutils-2_46-branch] PR 33838 Truncated translation in objcopy.c

Alan Modra amodra@sourceware.org
Tue Jan 27 23:54:48 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4e93f32a11c00d077328f3fb27d400f3f9b1252b

commit 4e93f32a11c00d077328f3fb27d400f3f9b1252b
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jan 26 14:23:29 2026 +1030

    PR 33838 Truncated translation in objcopy.c
    
    The only macros allowed are the ones specially handled by gettext,
    such as PRId64.
    
            * objcopy.c (copy_usage): Don't use string literal
            concatenation of macros in translated strings.
    
    Patch from Andreas Schwab <schwab@linux-m68k.org>
    
    (cherry picked from commit 1c8cfb3d217aee87562c4f4c4dbc1e4d60e8eadb)

Diff:
---
 binutils/objcopy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index c237f24adf1..fdd8bd11799 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -708,7 +708,7 @@ copy_usage (FILE *stream, int exit_status)
                                    <commit>\n\
      --subsystem <name>[:<version>]\n\
                                    Set PE subsystem to <name> [& <version>]\n\
-     --compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi" ZSTD_OPT "}]\n\
+     --compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi%s}]\n\
                                    Compress DWARF debug sections\n\
      --decompress-debug-sections   Decompress DWARF debug sections using zlib\n\
      --elf-stt-common=[yes|no]     Generate ELF common symbols with STT_COMMON\n\
@@ -721,7 +721,7 @@ copy_usage (FILE *stream, int exit_status)
   -V --version                     Display this program's version number\n\
   -h --help                        Display this output\n\
      --info                        List object formats & architectures supported\n\
-"));
+"), ZSTD_OPT);
   list_supported_targets (program_name, stream);
   if (REPORT_BUGS_TO[0] && exit_status == 0)
     fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);


More information about the Binutils-cvs mailing list