This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR ld/2443: Dwarf2 reader doesn't handle file 0 correctly
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Fri, 10 Mar 2006 12:53:24 -0800
- Subject: 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>");
}