aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2011-03-25 09:35:41 +0000
committerMark Wielaard <mark@gcc.gnu.org>2011-03-25 09:35:41 +0000
commit2a5ac39a3efd80d5380c1ae20dbbac2c19878f9e (patch)
tree8c515e6b49c1f01a24158e15fb4c20ca234d8771
parentfe052134f692c852e092a94917dfdec7b13612c0 (diff)
downloadgcc-2a5ac39a3efd80d5380c1ae20dbbac2c19878f9e.zip
gcc-2a5ac39a3efd80d5380c1ae20dbbac2c19878f9e.tar.gz
gcc-2a5ac39a3efd80d5380c1ae20dbbac2c19878f9e.tar.bz2
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0ba4304..05877e1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index aa6f6b6..06dcf9c 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];