Commit 3a57c6cb by Mark Mitchell Committed by Mark Mitchell

function.c (INVOKE__main): Do not define.

	* function.c (INVOKE__main): Do not define.
	(expand_main_function): Check HAS_INIT_SECTION when determining
	whether or not to call __main.

From-SVN: r99076
parent df1de1a3
2005-05-01 Mark Mitchell <mark@codesourcery.com>
* function.c (INVOKE__main): Do not define.
(expand_main_function): Check HAS_INIT_SECTION when determining
whether or not to call __main.
2005-05-01 Kazu Hirata <kazu@cs.umass.edu> 2005-05-01 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-loop-ivopts.c: Fix a comment typo. * tree-ssa-loop-ivopts.c: Fix a comment typo.
......
...@@ -3867,14 +3867,6 @@ init_function_for_compilation (void) ...@@ -3867,14 +3867,6 @@ init_function_for_compilation (void)
VARRAY_GROW (sibcall_epilogue, 0); VARRAY_GROW (sibcall_epilogue, 0);
} }
/* Define IVOKE__main if we should emit a call to __main at the start
of "main". */
#if (!defined(INVOKE__main) \
&& !defined(INIT_SECTION_ASM_OP) \
&& !defined(INIT_ARRAY_SECTION_ASM_OP))
#define INVOKE__main
#endif
void void
expand_main_function (void) expand_main_function (void)
{ {
...@@ -3914,7 +3906,10 @@ expand_main_function (void) ...@@ -3914,7 +3906,10 @@ expand_main_function (void)
} }
#endif #endif
#if defined(INVOKE__main) #if (defined(INVOKE__main) \
|| (!defined(HAS_INIT_SECTION) \
&& !defined(INIT_SECTION_ASM_OP) \
&& !defined(INIT_ARRAY_SECTION_ASM_OP)))
emit_library_call (init_one_libfunc (NAME__MAIN), LCT_NORMAL, VOIDmode, 0); emit_library_call (init_one_libfunc (NAME__MAIN), LCT_NORMAL, VOIDmode, 0);
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment