aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/go-main.c')
-rw-r--r--libgo/runtime/go-main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/runtime/go-main.c b/libgo/runtime/go-main.c
index 026469b..ff2958c 100644
--- a/libgo/runtime/go-main.c
+++ b/libgo/runtime/go-main.c
@@ -30,6 +30,11 @@
extern char **environ;
+/* A copy of _end that a shared library can reasonably refer to. */
+uintptr __go_end;
+
+extern byte _end[];
+
/* The main function. */
int
@@ -41,6 +46,7 @@ main (int argc, char **argv)
return 0;
runtime_isstarted = true;
+ __go_end = (uintptr)_end;
runtime_check ();
runtime_args (argc, (byte **) argv);
runtime_osinit ();