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
+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
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. */
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. */