summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-12 19:12:08 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-12 19:12:08 +0000
commitdc4b309b8b22ac06d981a5a0c63159b9daa60f41 (patch)
tree224d943744c0280beb3d5ed43a18df98b06231cf /gcc/varasm.c
parent5734a3c52e2e1610382b3af184f947c57b186d5c (diff)
downloadgcc-dc4b309b8b22ac06d981a5a0c63159b9daa60f41.tar.gz
* varasm.c (default_function_section): Check flag_reorder_functions
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
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c3
1 files changed, 3 insertions, 0 deletions
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. */