aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-12-12 20:12:08 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2010-12-12 19:12:08 +0000
commit4a10fb9416cefe050c804006aa77ca4fd6a8e8ab (patch)
tree224d943744c0280beb3d5ed43a18df98b06231cf /gcc
parentdcac2e64b306166f78fd8484009268916148a19d (diff)
downloadgcc-4a10fb9416cefe050c804006aa77ca4fd6a8e8ab.zip
gcc-4a10fb9416cefe050c804006aa77ca4fd6a8e8ab.tar.gz
gcc-4a10fb9416cefe050c804006aa77ca4fd6a8e8ab.tar.bz2
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 <ro@CeBiTec.Uni-Bielefeld.DE> From-SVN: r167727
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/darwin.c2
-rw-r--r--gcc/varasm.c3
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. */