* dwarf2dbg.c (dwarf2_finish): Don't write a .debug_line section

without a corresponding .debug_info section.
This commit is contained in:
Bob Wilson 2004-11-22 16:29:33 +00:00
parent d190d04643
commit 3120ef826e
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-11-22 Bob Wilson <bob.wilson@acm.org>
* dwarf2dbg.c (dwarf2_finish): Don't write a .debug_line section
without a corresponding .debug_info section.
2004-11-22 Hans-Peter Nilsson <hp@axis.com>
* read.c (potable): Add "error" and "warning".

View File

@ -1356,13 +1356,12 @@ dwarf2_finish (void)
struct line_seg *s;
/* We don't need to do anything unless:
- Some debug information was recorded via .file/.loc
- or, we are generating DWARF2 information ourself (--gdwarf2)
- Some debug information was recorded via .file/.loc or
generated by GAS (--gdwarf2)
- or, there is a user-provided .debug_info section which could
reference the file table in the .debug_line section we generate
below. */
if (all_segs == NULL
&& debug_type != DEBUG_DWARF2
&& (bfd_get_section_by_name (stdoutput, ".debug_info") == NULL
|| files_in_use == 0))
return;