]> gcc.gnu.org Git - gcc.git/commitdiff
re PR debug/42454 (debug_ranges table contains empty range for unused .text section...
authorCary Coutant <ccoutant@google.com>
Tue, 22 Dec 2009 17:37:57 +0000 (17:37 +0000)
committerCary Coutant <ccoutant@gcc.gnu.org>
Tue, 22 Dec 2009 17:37:57 +0000 (09:37 -0800)
PR debug/42454
* dwarf2out.c (dwarf2out_finish): Don't output range for .text
section unless .text section was used.  Likewise for cold.

From-SVN: r155402

gcc/ChangeLog
gcc/dwarf2out.c

index 38fed9a074f8b4d76e744f6e6000a570b5cbd130..3b14a383defe29444cb06a778e394ab6338ca8dc 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-22  Cary Coutant  <ccoutant@google.com>
+
+       PR debug/42454
+       * dwarf2out.c (dwarf2out_finish): Don't output range for .text
+       section unless .text section was used.  Likewise for cold.
+
 2009-12-22  Brian Hackett  <bhackett1024@gmail.com>
 
        * doc/plugins.texi: Rename pre-genericize event.
index da0405774c655efb2433e98d003db724d647c84a..2296dc3494597727703b6775237208fe1830b83f 100644 (file)
@@ -21218,10 +21218,11 @@ dwarf2out_finish (const char *filename)
       add_AT_addr (comp_unit_die, DW_AT_low_pc, const0_rtx);
       add_AT_addr (comp_unit_die, DW_AT_entry_pc, const0_rtx);
 
-      add_AT_range_list (comp_unit_die, DW_AT_ranges,
-                        add_ranges_by_labels (text_section_label,
-                                              text_end_label));
-      if (flag_reorder_blocks_and_partition)
+      if (text_section_used)
+       add_AT_range_list (comp_unit_die, DW_AT_ranges,
+                          add_ranges_by_labels (text_section_label,
+                                                text_end_label));
+      if (flag_reorder_blocks_and_partition && cold_text_section_used)
        add_ranges_by_labels (cold_text_section_label,
                              cold_end_label);
 
This page took 0.100775 seconds and 5 git commands to generate.