summaryrefslogtreecommitdiff
path: root/gcc/crtstuff.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-05-24 03:32:28 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-05-24 03:32:28 +0000
commit84b64a19a529d15ab89bacab81381a4b7d6e22ca (patch)
treede5cfc87c1f4ed3c54a62a5ea015f757d2cb2475 /gcc/crtstuff.c
parent9641ab268af9fb5160afd41a8a945f22264ab9ac (diff)
downloadgcc-84b64a19a529d15ab89bacab81381a4b7d6e22ca.tar.gz
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1069 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/crtstuff.c')
-rw-r--r--gcc/crtstuff.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c
index 379c8cee082..8dae8cf845f 100644
--- a/gcc/crtstuff.c
+++ b/gcc/crtstuff.c
@@ -76,7 +76,17 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
INVOKE__main is defined. This has the additional effect of forcing cc1
to switch to the .text section. */
static void __do_global_ctors_aux ();
-void __do_global_ctors () { __do_global_ctors_aux (); }
+void __do_global_ctors ()
+{
+#ifdef INVOKE__main /* If __main won't actually call __do_global_ctors
+ then it doesn't matter what's inside the function.
+ The inside of __do_global_ctors_aux is called
+ automatically in that case.
+ And the Alliant fx2800 linker crashes
+ on this reference. So prevent the crash. */
+ __do_global_ctors_aux ();
+#endif
+}
asm (INIT_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */