PowerPC64 report number of stub iterations
authorAlan Modra <amodra@gmail.com>
Mon, 22 May 2023 01:05:02 +0000 (10:35 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 22 May 2023 01:05:02 +0000 (10:35 +0930)
As a developer it is sometimes useful to know how many times stubs
have been resized.  Report the count for users too, in ld --stats.

bfd/elf64-ppc.c

index daa6deef7289c13879e8bc5a554eba21b137b6d3..33f4275261d077f6f70adbd5a6953606ef7827ec 100644 (file)
@@ -15320,19 +15320,19 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
     {
       char *groupmsg;
       if (asprintf (&groupmsg,
-                   ngettext ("linker stubs in %u group\n",
-                             "linker stubs in %u groups\n",
+                   ngettext ("linker stubs in %u group",
+                             "linker stubs in %u groups",
                              stub_sec_count),
                    stub_sec_count) < 0)
        *stats = NULL;
       else
        {
-         if (asprintf (stats, _("%s"
+         if (asprintf (stats, _("%s, iter %u\n"
                                 "  branch         %lu\n"
                                 "  long branch    %lu\n"
                                 "  plt call       %lu\n"
                                 "  global entry   %lu"),
-                       groupmsg,
+                       groupmsg, htab->stub_iteration,
                        htab->stub_count[ppc_stub_long_branch - 1],
                        htab->stub_count[ppc_stub_plt_branch - 1],
                        htab->stub_count[ppc_stub_plt_call - 1],