From 81f2b976a55ab0dee51d3bcdc12eb934ce7af855 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 18 Mar 2011 17:18:05 +0100 Subject: re PR debug/48176 (.debug_aranges is no longer emitted) PR debug/48176 * dwarf2out.c (dwarf2out_finish): Call output_aranges even when arange_table_in_use is 0, but either text_section_used or cold_text_section_used is true. Don't call it if !info_section_emitted. From-SVN: r171150 --- gcc/dwarf2out.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 74905e3..5d64b8d 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -23667,7 +23667,8 @@ dwarf2out_finish (const char *filename) /* Output the address range information. We only put functions in the arange table, so don't write it out if we don't have any. */ - if (arange_table_in_use) + if ((text_section_used || cold_text_section_used || arange_table_in_use) + && info_section_emitted) { switch_to_section (debug_aranges_section); output_aranges (); -- cgit v1.1