diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-05-11 01:12:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-05-11 01:12:37 +0000 |
commit | c130ab6aad57e0309ec02f58f383aece584ac8cb (patch) | |
tree | 0a5fd2bf4f6ad9b59a03ff33d2758937064fc015 /libgo/runtime/runtime.h | |
parent | d7b9b0805d5ab514c43e1fe57e43a10394d5d965 (diff) | |
download | gcc-c130ab6aad57e0309ec02f58f383aece584ac8cb.zip gcc-c130ab6aad57e0309ec02f58f383aece584ac8cb.tar.gz gcc-c130ab6aad57e0309ec02f58f383aece584ac8cb.tar.bz2 |
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
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r-- | libgo/runtime/runtime.h | 2 |
1 files changed, 2 insertions, 0 deletions
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) |