PowerPC64 statistics message
authorAlan Modra <amodra@gmail.com>
Mon, 6 Nov 2017 04:51:53 +0000 (15:21 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 7 Nov 2017 08:20:03 +0000 (18:50 +1030)
Fixes "linker stubs in 1 groups".

* elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
statistics message.

bfd/ChangeLog
bfd/elf64-ppc.c

index 705179ac26f9033a3ba6d2476134c874617cff56..9e820c5b854e0031a0bf5fd60cfd9fbac40a3ddf 100644 (file)
@@ -1,3 +1,8 @@
+2017-11-07  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
+       statistics message.
+
 2017-11-07  Alan Modra  <amodra@gmail.com>
 
        * sysdep.h: Formatting, comment fixes.
index 31cb2f2a2a33d15e55701dc35abdb3caaf94652d..1cf7964127257311af1d6b731089ab18b115cdcd 100644 (file)
@@ -13303,20 +13303,23 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
 
   if (stats != NULL)
     {
+      size_t len;
       *stats = bfd_malloc (500);
       if (*stats == NULL)
        return FALSE;
 
-      sprintf (*stats, _("linker stubs in %u group%s\n"
-                        "  branch       %lu\n"
-                        "  toc adjust   %lu\n"
-                        "  long branch  %lu\n"
-                        "  long toc adj %lu\n"
-                        "  plt call     %lu\n"
-                        "  plt call toc %lu\n"
-                        "  global entry %lu"),
-              stub_sec_count,
-              stub_sec_count == 1 ? "" : "s",
+      len = sprintf (*stats,
+                    ngettext ("linker stubs in %u group\n",
+                              "linker stubs in %u groups\n",
+                              stub_sec_count),
+                    stub_sec_count);
+      sprintf (*stats + len, _("  branch       %lu\n"
+                              "  toc adjust   %lu\n"
+                              "  long branch  %lu\n"
+                              "  long toc adj %lu\n"
+                              "  plt call     %lu\n"
+                              "  plt call toc %lu\n"
+                              "  global entry %lu"),
               htab->stub_count[ppc_stub_long_branch - 1],
               htab->stub_count[ppc_stub_long_branch_r2off - 1],
               htab->stub_count[ppc_stub_plt_branch - 1],