dwarf2out.c (dwarf2out_switch_text_section): Do not call dwarf2out_note_section_used...
authorUros Bizjak <uros@gcc.gnu.org>
Sat, 19 Jan 2008 17:57:57 +0000 (18:57 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sat, 19 Jan 2008 17:57:57 +0000 (18:57 +0100)
        * dwarf2out.c (dwarf2out_switch_text_section): Do not call
        dwarf2out_note_section_used if cold_text_section is NULL.

From-SVN: r131654

gcc/ChangeLog
gcc/dwarf2out.c

index 3fed0b22cab88656162005d029e14ec9232219ab..ec25be5b0a635220c15a86bfe94d7b15f1159c14 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-19  Uros Bizjak  <ubizjak@gmail.com>
+
+       * dwarf2out.c (dwarf2out_switch_text_section): Do not call
+       dwarf2out_note_section_used if cold_text_section is NULL.
+
 2008-01-19  Jakub Jelinek  <jakub@redhat.com>
 
        PR gcov-profile/34610
        function always sign-extends the value.
 
 2008-01-16  Jakub Jelinek  <jakub@redhat.com>
-       Richard Guenther  <rguenther@suse.de>
+           Richard Guenther  <rguenther@suse.de>
 
        PR c/34668
        * gimplify.c (fold_indirect_ref_rhs): Rename to ...
index 3a5b897c8776e5193c6f4b68097f6483263f00f2..829b9ee328f52ebdf81d4405a479511295288bcf 100644 (file)
@@ -2729,7 +2729,9 @@ dwarf2out_switch_text_section (void)
      don't attempt to advance_loc4 between labels in different sections.  */
   fde->dw_fde_current_label = NULL;
 
-  dwarf2out_note_section_used ();
+  /* There is no need to mark used sections when not debugging.  */
+  if (cold_text_section != NULL)
+    dwarf2out_note_section_used ();
 }
 #endif
 \f