re PR debug/48041 (dwarf2out emits unnecessary null byte in empty .debug_abbrev section)
authorMark Wielaard <mjw@redhat.com>
Fri, 25 Mar 2011 09:35:41 +0000 (09:35 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Fri, 25 Mar 2011 09:35:41 +0000 (09:35 +0000)
PR debug/48041
* dwarf2out.c (output_abbrev_section): Only write table when
abbrev_die_table_in_use > 1.

From-SVN: r171441

gcc/ChangeLog
gcc/dwarf2out.c

index 0ba43047d8bd270ab3e1f7d412561931df5bdf21..05877e1ee8ca936b9f76463cf21224c247eb63d5 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-24  Mark Wielaard  <mjw@redhat.com>
+
+       PR debug/48041
+       * dwarf2out.c (output_abbrev_section): Only write table when
+       abbrev_die_table_in_use > 1.
+
 2011-02-24  Richard Henderson  <rth@redhat.com>
 
        * config/alpha/alpha.c (alpha_expand_unaligned_load): Use extql.
index aa6f6b6b9cfac5d8f253f36ae9e145e66ed0ca99..06dcf9c79d181236f16111c20003f85ddb5d37ee 100644 (file)
@@ -11056,6 +11056,9 @@ output_abbrev_section (void)
 {
   unsigned long abbrev_id;
 
+  if (abbrev_die_table_in_use == 1)
+    return;
+
   for (abbrev_id = 1; abbrev_id < abbrev_die_table_in_use; ++abbrev_id)
     {
       dw_die_ref abbrev = abbrev_die_table[abbrev_id];