Update year range in copyright notice of binutils files
[deliverable/binutils-gdb.git] / binutils / size.c
index e727165f019ae0fa692b7a50ec337889cfed6c5a..47f14fce333750c1f9a80efa51efe33e31a21bc4 100644 (file)
@@ -1,5 +1,5 @@
 /* size.c -- report size of various sections of an executable file.
-   Copyright (C) 1991-2014 Free Software Foundation, Inc.
+   Copyright (C) 1991-2018 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -133,6 +133,7 @@ main (int argc, char **argv)
 
   program_name = *argv;
   xmalloc_set_program_name (program_name);
+  bfd_set_error_program_name (program_name);
 
   expandargv (&argc, &argv);
 
@@ -365,7 +366,14 @@ display_archive (bfd *file)
       display_bfd (arfile);
 
       if (last_arfile != NULL)
-       bfd_close (last_arfile);
+       {
+         bfd_close (last_arfile);
+
+         /* PR 17512: file: a244edbc.  */
+         if (last_arfile == arfile)
+           return;
+       }
+
       last_arfile = arfile;
     }
 
@@ -491,8 +499,8 @@ print_berkeley_format (bfd *abfd)
 
   fputs (bfd_get_filename (abfd), stdout);
 
-  if (bfd_my_archive (abfd))
-    printf (" (ex %s)", bfd_get_filename (bfd_my_archive (abfd)));
+  if (abfd->my_archive)
+    printf (" (ex %s)", bfd_get_filename (abfd->my_archive));
 }
 
 /* I REALLY miss lexical functions! */
@@ -579,8 +587,8 @@ print_sysv_format (bfd *file)
   svi_total = 0;
   printf ("%s  ", bfd_get_filename (file));
 
-  if (bfd_my_archive (file))
-    printf (" (ex %s)", bfd_get_filename (bfd_my_archive (file)));
+  if (file->my_archive)
+    printf (" (ex %s)", bfd_get_filename (file->my_archive));
 
   printf (":\n%-*s   %*s   %*s\n", svi_namelen, "section",
          svi_sizelen, "size", svi_vmalen, "addr");
This page took 0.024276 seconds and 4 git commands to generate.