From: Jan Hubicka Date: Sun, 12 Dec 2010 19:12:08 +0000 (+0100) Subject: varasm.c (default_function_section): Check flag_reorder_functions and targetm.have_na... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a10fb9416cefe050c804006aa77ca4fd6a8e8ab;p=gcc.git varasm.c (default_function_section): Check flag_reorder_functions and targetm.have_named_sections. * varasm.c (default_function_section): Check flag_reorder_functions and targetm.have_named_sections. * config/darwin.c (darwin_function_section): Check flag_reorder_functions. Co-Authored-By: Rainer Orth From-SVN: r167727 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca7b49da7c4..73329a8c3ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2010-12-12 Jan Hubicka + Rainer Orth + + * 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 PR target/46179 diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 93621acea79..8ae6409bcee 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 da494d69ad8..891d4e06e57 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. */