Detect and issue a warning message if the line number table could not be read.
authorNick Clifton <nickc@redhat.com>
Tue, 5 Aug 2003 08:25:17 +0000 (08:25 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 5 Aug 2003 08:25:17 +0000 (08:25 +0000)
bfd/ChangeLog
bfd/coffcode.h

index 8645db0104383f6e0180c894be5552c72fcb2dba..e4c4f92d6ef4bb6911f7564b65a2cab7e3690051 100644 (file)
@@ -1,3 +1,8 @@
+2003-08-03  Jeff Muizelaar  <muizelaar@rogers.com>
+
+       * coffcode.h: (coff_slurp_line_table) Return with a warning
+       message if the line number table could not be read.
+
 2003-08-04  Nick Clifton  <nickc@redhat.com>
 
        * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
index b8dde1ab28805bcf0fa8f25b34a94796122243ba..3b39f095af648c5994bd632070edb0bebef9774c 100644 (file)
@@ -4407,6 +4407,13 @@ coff_slurp_line_table (abfd, asect)
 
   amt = (bfd_size_type) bfd_coff_linesz (abfd) * asect->lineno_count;
   native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, amt);
+  if (native_lineno == NULL)
+    {
+      (*_bfd_error_handler)
+        (_("%s: warning: line number table read failed"),
+        bfd_archive_filename (abfd));
+      return FALSE;
+    }
   amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
   lineno_cache = (alent *) bfd_alloc (abfd, amt);
   if (lineno_cache == NULL)