From c130ab6aad57e0309ec02f58f383aece584ac8cb Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 11 May 2019 01:12:37 +0000 Subject: runtime: set up g early runtime.throw needs a g to work properly. Set up g early, to ensure that if something goes wrong in the runtime startup (e.g. runtime.check fails), the program terminates in a reasonable way. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176657 From-SVN: r271088 --- libgo/runtime/runtime.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libgo/runtime/runtime.h') diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index 97b1f11..9506e3d 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -240,6 +240,8 @@ int32 runtime_snprintf(byte*, int32, const char*, ...); #define runtime_memmove(a, b, s) __builtin_memmove((a), (b), (s)) String runtime_gostringnocopy(const byte*) __asm__ (GOSYM_PREFIX "runtime.gostringnocopy"); +void runtime_ginit(void) + __asm__ (GOSYM_PREFIX "runtime.ginit"); void runtime_schedinit(void) __asm__ (GOSYM_PREFIX "runtime.schedinit"); void runtime_initsig(bool) -- cgit v1.1