aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 74905e3f53e..5d64b8d3fb9 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 ();