2002-08-01 H.J. Lu <hjl@gnu.org>

Daniel Jacobowitz  <drow@mvista.com>

        * dwarf2dbg.c (dwarf2_finish): Don't emit unreferenced
        .debug_line section unless it has line information.
This commit is contained in:
Daniel Jacobowitz
2002-08-01 15:04:41 +00:00
parent 24a1ba0f48
commit 70ee46581b
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2002-08-01 H.J. Lu <hjl@gnu.org>
Daniel Jacobowitz <drow@mvista.com>
* dwarf2dbg.c (dwarf2_finish): Don't emit unreferenced
.debug_line section unless it has line information.
2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
* config/tc-ns32k.h (md_pcrel_adjust): Supply prototype.

View File

@ -1248,8 +1248,15 @@ dwarf2_finish ()
segT line_seg;
struct line_seg *s;
/* If no debug information was recorded, nothing to do. */
if (all_segs == NULL && files_in_use <= 1)
/* We don't need to do anything unless:
- Some debug information was recorded via .file/.loc
- or, we are generating DWARF2 information ourself (--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)
return;
/* Calculate the size of an address for the target machine. */