PATCH: PR ld/2443: Dwarf2 reader doesn't handle file 0 correctly
H. J. Lu
hjl@lucon.org
Fri Mar 10 20:53:00 GMT 2006
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>");
}
More information about the Binutils
mailing list