re PR debug/48176 (.debug_aranges is no longer emitted)
authorJakub Jelinek <jakub@redhat.com>
Fri, 18 Mar 2011 16:18:05 +0000 (17:18 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 18 Mar 2011 16:18:05 +0000 (17:18 +0100)
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/ChangeLog
gcc/dwarf2out.c

index 4b33a39ba82b778792dce497c015ede794bd0af2..26c07837ccee9b881711e4260e6dcf6894a85ff1 100644 (file)
@@ -1,3 +1,11 @@
+2011-03-18  Jakub Jelinek  <jakub@redhat.com>
+
+       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.
+
 2011-03-18  Anatoly Sokolov  <aesok@post.ru>
 
        * config/avr/avr.h (RET_REGISTER, LIBCALL_VALUE,
index 74905e3f53efd309ed34c73c10f0e22aba5bbbdc..5d64b8d3fb90f98a62eecad36fdf261e52cbf4fb 100644 (file)
@@ -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 ();