Reset dump_sects after processing each archive member.
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 18 Jan 2011 17:43:56 +0000 (17:43 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 18 Jan 2011 17:43:56 +0000 (17:43 +0000)
2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

PR binutils/12408
* readelf.c (process_archive): Free and reset dump_sects
after processing each archive member.

binutils/ChangeLog
binutils/readelf.c

index 9287fdac629ae4bc4304dd3ec869765f50540959..4e62cdcb9321573d4ce0154a6f85ce5f56f3fd0d 100644 (file)
@@ -1,3 +1,9 @@
+2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/12408
+       * readelf.c (process_archive): Free and reset dump_sects
+       after processing each archive member.
+
 2011-01-11  Andreas Schwab  <schwab@redhat.com>
 
        * readelf.c (print_symbol): Handle symbol characters as unsigned.
index a9f271d5a80c83a8e47d21c0008b76497bfa356f..abc251a50010fb2dc2b7b90b0b4067790caa9157 100644 (file)
@@ -12640,6 +12640,13 @@ process_archive (char * file_name, FILE * file, bfd_boolean is_thin_archive)
           ret |= process_object (qualified_name, file);
         }
 
+      if (dump_sects != NULL)
+       {
+         free (dump_sects);
+         dump_sects = NULL;
+         num_dump_sects = 0;
+       }
+
       free (qualified_name);
     }