OSDN Git Service

* varasm.c (default_function_section): Check flag_reorder_functions
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Dec 2010 19:12:08 +0000 (19:12 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Dec 2010 19:12:08 +0000 (19:12 +0000)
and targetm.have_named_sections.
* config/darwin.c (darwin_function_section): Check
flag_reorder_functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167727 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/darwin.c
gcc/varasm.c

index ca7b49d..73329a8 100644 (file)
@@ -1,3 +1,11 @@
+2010-12-12  Jan Hubicka  <jh@suse.cz>
+           Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * varasm.c (default_function_section): Check flag_reorder_functions
+       and targetm.have_named_sections.
+       * config/darwin.c (darwin_function_section): Check
+       flag_reorder_functions.
+
 2010-12-12  Finn Thain  <fthain@telegraphics.com.au>
 
        PR target/46179
index 93621ac..8ae6409 100644 (file)
@@ -2968,6 +2968,8 @@ section *
 darwin_function_section (tree decl, enum node_frequency freq,
                          bool startup, bool exit)
 {
+  if (!flag_reorder_functions)
+    return NULL;
   /* Startup code should go to startup subsection unless it is
      unlikely executed (this happens especially with function splitting
      where we can split away unnecesary parts of static constructors.  */
index da494d6..891d4e0 100644 (file)
@@ -533,6 +533,9 @@ section *
 default_function_section (tree decl, enum node_frequency freq,
                          bool startup, bool exit)
 {
+  if (!flag_reorder_functions
+      || !targetm.have_named_sections)
+    return NULL;
   /* Startup code should go to startup subsection unless it is
      unlikely executed (this happens especially with function splitting
      where we can split away unnecesary parts of static constructors.  */