This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR ld/2443: Dwarf2 reader doesn't handle file 0 correctly


According to DWARF 3, 0 means no source file has been specified. We
shouldn't complain about it.


H.J.
---
2006-03-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/2443
	* dwarf2.c (concat_filename): Don't issue an error if file is
	0.

--- bfd/dwarf2.c.bad	2006-03-06 14:23:14.000000000 -0800
+++ bfd/dwarf2.c	2006-03-10 12:48:20.000000000 -0800
@@ -865,8 +865,10 @@ concat_filename (struct line_info_table 
 
   if (file - 1 >= table->num_files)
     {
-      (*_bfd_error_handler)
-	(_("Dwarf Error: mangled line number section (bad file number)."));
+      /* FILE == 0 means unknown.  */
+      if (file)
+	(*_bfd_error_handler)
+	  (_("Dwarf Error: mangled line number section (bad file number)."));
       return strdup ("<unknown>");
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]