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
This commit is contained in:
Mark Mitchell 2005-05-01 18:23:27 +00:00 committed by Mark Mitchell
parent df1de1a353
commit 3a57c6cb0c
2 changed files with 10 additions and 9 deletions

View File

@ -1,3 +1,9 @@
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>
* tree-ssa-loop-ivopts.c: Fix a comment typo.

View File

@ -3867,14 +3867,6 @@ init_function_for_compilation (void)
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
expand_main_function (void)
{
@ -3914,7 +3906,10 @@ expand_main_function (void)
}
#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);
#endif
}