From: Mark Wielaard Date: Fri, 25 Mar 2011 09:35:41 +0000 (+0000) Subject: re PR debug/48041 (dwarf2out emits unnecessary null byte in empty .debug_abbrev section) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a5ac39a3efd80d5380c1ae20dbbac2c19878f9e;p=gcc.git re PR debug/48041 (dwarf2out emits unnecessary null byte in empty .debug_abbrev section) PR debug/48041 * dwarf2out.c (output_abbrev_section): Only write table when abbrev_die_table_in_use > 1. From-SVN: r171441 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0ba43047d8b..05877e1ee8c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-24 Mark Wielaard + + PR debug/48041 + * dwarf2out.c (output_abbrev_section): Only write table when + abbrev_die_table_in_use > 1. + 2011-02-24 Richard Henderson * config/alpha/alpha.c (alpha_expand_unaligned_load): Use extql. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index aa6f6b6b9cf..06dcf9c79d1 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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];