diff options
| -rw-r--r-- | gcc/ChangeLog | 8 | ||||
| -rw-r--r-- | gcc/config/darwin.c | 2 | ||||
| -rw-r--r-- | gcc/varasm.c | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca7b49d..73329a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 93621ac..8ae6409 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -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. */ diff --git a/gcc/varasm.c b/gcc/varasm.c index da494d6..891d4e0 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -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. */ |
