1 /* go-main.c -- the main function for a Go program.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
13 #ifdef HAVE_FPU_CONTROL_H
14 #include <fpu_control.h>
19 #include "go-string.h"
29 /* The main function for a Go program. This records the command line
30 parameters, calls the real main function, and returns a zero status
31 if the real main function returns. */
33 extern char **environ;
35 extern void runtime_main (void);
36 static void mainstart (void *);
38 /* The main function. */
41 main (int argc, char **argv)
44 runtime_args (argc, (byte **) argv);
47 __go_go (mainstart, NULL);
48 runtime_mstart (runtime_m ());
53 mainstart (void *arg __attribute__ ((unused)))