* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Dump out
authorAlan Modra <amodra@gmail.com>
Thu, 19 Jun 2003 13:51:05 +0000 (13:51 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 19 Jun 2003 13:51:05 +0000 (13:51 +0000)
statistics from ppc64_elf_build_stubs.

ld/ChangeLog
ld/emultempl/ppc64elf.em

index 219869d9d89f8227317bdafe0ee1735e32753cf4..8f2ee6ff54452db56ce894c9c7d5fb18d3a1e853 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-19  Alan Modra  <amodra@bigpond.net.au>
+
+       * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Dump out
+       statistics from ppc64_elf_build_stubs.
+
 2003-06-19  Alan Modra  <amodra@bigpond.net.au>
 
        * emultempl/ppc64elf.em (build_section_lists): Check return status
index c4407520ae971d67443598d9534efd7609b5eb3a..da50ba1cac61b8c9f719a5b2a10798092f38c5ef 100644 (file)
@@ -387,8 +387,22 @@ gld${EMULATION_NAME}_finish ()
 
   if (stub_file != NULL && stub_file->the_bfd->sections != NULL)
     {
-      if (!ppc64_elf_build_stubs (emit_stub_syms, &link_info))
+      char *msg = NULL;
+      char *line, *endline;
+
+      if (!ppc64_elf_build_stubs (emit_stub_syms, &link_info,
+                                 config.stats ? &msg : NULL))
        einfo ("%X%P: can not build stubs: %E\n");
+
+      for (line = msg; line != NULL; line = endline)
+       {
+         endline = strchr (line, '\n');
+         if (endline != NULL)
+           *endline++ = '\0';
+         fprintf (stderr, "%s: %s\n", program_name, line);
+       }
+      if (msg != NULL)
+       free (msg);
     }
 }