MOVL BX, 124(SP)
// set default stack bounds.
- // initcgo may update stackguard.
+ // _cgo_init may update stackguard.
MOVL $runtime·g0(SB), BP
LEAL (-64*1024+104)(SP), BX
MOVL BX, g_stackguard(BP)
MOVL SP, g_stackbase(BP)
- // if there is an initcgo, call it to let it
+ // if there is an _cgo_init, call it to let it
// initialize and to set up GS. if not,
// we set up GS ourselves.
- MOVL initcgo(SB), AX
+ MOVL _cgo_init(SB), AX
TESTL AX, AX
JZ needtls
PUSHL BP
CALL AX
POPL BP
- // skip runtime·ldt0setup(SB) and tls test after initcgo for non-windows
+ // skip runtime·ldt0setup(SB) and tls test after _cgo_init for non-windows
CMPL runtime·iswindows(SB), $0
JEQ ok
needtls:
MOVQ BX, 24(SP)
// create istack out of the given (operating system) stack.
- // initcgo may update stackguard.
+ // _cgo_init may update stackguard.
MOVQ $runtime·g0(SB), DI
LEAQ (-64*1024+104)(SP), BX
MOVQ BX, g_stackguard(DI)
MOVQ SP, g_stackbase(DI)
- // if there is an initcgo, call it.
- MOVQ initcgo(SB), AX
+ // if there is an _cgo_init, call it.
+ MOVQ _cgo_init(SB), AX
TESTQ AX, AX
JZ needtls
// g0 already in DI
MOVW R13, g_stackbase(g)
BL runtime·emptyfunc(SB) // fault if stack check is wrong
- // if there is an initcgo, call it.
- MOVW initcgo(SB), R2
+ // if there is an _cgo_init, call it.
+ MOVW _cgo_init(SB), R2
CMP $0, R2
- MOVW.NE g, R0 // first argument of initcgo is g
+ MOVW.NE g, R0 // first argument of _cgo_init is g
BL.NE (R2) // will clobber R0-R3
BL runtime·checkgoarm(SB)
MOVW 0(FP), R1 // gobuf
MOVW gobuf_g(R1), g
MOVW 0(g), R2 // make sure g != nil
- MOVW cgo_save_gm(SB), R2
+ MOVW _cgo_save_gm(SB), R2
CMP $0, R2 // if in Cgo, we have to save g and m
BL.NE (R2) // this call will clobber R0
MOVW 4(FP), R0 // return 2nd arg
MOVW 4(FP), R1 // fn
MOVW gobuf_g(R3), g
MOVW 0(g), R0 // make sure g != nil
- MOVW cgo_save_gm(SB), R0
+ MOVW _cgo_save_gm(SB), R0
CMP $0, R0 // if in Cgo, we have to save g and m
BL.NE (R0) // this call will clobber R0
MOVW 8(FP), R7 // context
MOVW 4(FP), R1 // fn
MOVW gobuf_g(R3), g
MOVW 0(g), R0 // make sure g != nil
- MOVW cgo_save_gm(SB), R0
+ MOVW _cgo_save_gm(SB), R0
CMP $0, R0 // if in Cgo, we have to save g and m
BL.NE (R0) // this call will clobber R0
MOVW gobuf_sp(R3), SP // restore SP
// See cgocall.c for more details.
TEXT runtime·cgocallback_gofunc(SB),7,$16
// Load m and g from thread-local storage.
- MOVW cgo_load_gm(SB), R0
+ MOVW _cgo_load_gm(SB), R0
CMP $0, R0
BL.NE (R0)
MOVW gg+4(FP), g
// Save m and g to thread-local storage.
- MOVW cgo_save_gm(SB), R0
+ MOVW _cgo_save_gm(SB), R0
CMP $0, R0
BL.NE (R0)
pthread_key_delete(tofree[i]);
}
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
inittls();
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
}
void
-xinitcgo(G *g)
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
inittls();
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
static void* threadentry(void*);
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
static void* threadentry(void*);
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
// Note: all three functions will clobber R0, and the last
// two can be called from 5c ABI code.
void __aeabi_read_tp(void) __attribute__((naked));
-void cgo_tls_set_gm(void) __attribute__((naked));
-void cgo_tls_get_gm(void) __attribute__((naked));
+void x_cgo_save_gm(void) __attribute__((naked));
+void x_cgo_load_gm(void) __attribute__((naked));
void
__aeabi_read_tp(void)
// g (R10) at 8(TP), m (R9) at 12(TP)
void
-cgo_tls_get_gm(void)
+x_cgo_load_gm(void)
{
__asm__ __volatile__ (
"push {lr}\n\t"
}
void
-cgo_tls_set_gm(void)
+x_cgo_save_gm(void)
{
__asm__ __volatile__ (
"push {lr}\n\t"
}
// both cgo_tls_{get,set}_gm can be called from runtime
-void (*cgo_load_gm)(void) = cgo_tls_get_gm;
-void (*cgo_save_gm)(void) = cgo_tls_set_gm;
+void (*_cgo_load_gm)(void) = x_cgo_load_gm;
+void (*_cgo_save_gm)(void) = x_cgo_save_gm;
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
- cgo_tls_set_gm(); // save g and m for the initial thread
+ x_cgo_save_gm(); // save g and m for the initial thread
pthread_attr_init(&attr);
pthread_attr_getstacksize(&attr, &size);
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
pthread_t p;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096 * 2;
static void *threadentry(void*);
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
static void* threadentry(void*);
void
-xinitcgo(G* g)
+x_cgo_init(G* g)
{
pthread_attr_t attr;
size_t size;
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
// Note: all three functions will clobber R0, and the last
// two can be called from 5c ABI code.
void __aeabi_read_tp(void) __attribute__((naked));
-void cgo_tls_set_gm(void) __attribute__((naked));
-void cgo_tls_get_gm(void) __attribute__((naked));
+void x_cgo_save_gm(void) __attribute__((naked));
+void x_cgo_load_gm(void) __attribute__((naked));
void
__aeabi_read_tp(void)
// g (R10) at 8(TP), m (R9) at 12(TP)
void
-cgo_tls_get_gm(void)
+x_cgo_load_gm(void)
{
__asm__ __volatile__ (
"push {lr}\n\t"
}
void
-cgo_tls_set_gm(void)
+x_cgo_save_gm(void)
{
__asm__ __volatile__ (
"push {lr}\n\t"
}
// both cgo_tls_{get,set}_gm can be called from runtime
-void (*cgo_load_gm)(void) = cgo_tls_get_gm;
-void (*cgo_save_gm)(void) = cgo_tls_set_gm;
+void (*_cgo_load_gm)(void) = x_cgo_load_gm;
+void (*_cgo_save_gm)(void) = x_cgo_save_gm;
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
- cgo_tls_set_gm(); // save g and m for the initial thread
+ x_cgo_save_gm(); // save g and m for the initial thread
pthread_attr_init(&attr);
pthread_attr_getstacksize(&attr, &size);
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
pthread_t p;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096 * 2;
static void* threadentry(void*);
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
static void* threadentry(void*);
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
// Note: all three functions will clobber R0, and the last
// two can be called from 5c ABI code.
void __aeabi_read_tp(void) __attribute__((naked));
-void cgo_tls_set_gm(void) __attribute__((naked));
-void cgo_tls_get_gm(void) __attribute__((naked));
+void x_cgo_save_gm(void) __attribute__((naked));
+void x_cgo_load_gm(void) __attribute__((naked));
void
__aeabi_read_tp(void)
// g (R10) at 8(TP), m (R9) at 12(TP)
void
-cgo_tls_get_gm(void)
+x_cgo_load_gm(void)
{
__asm__ __volatile__ (
"push {lr}\n\t"
}
void
-cgo_tls_set_gm(void)
+x_cgo_save_gm(void)
{
__asm__ __volatile__ (
"push {lr}\n\t"
}
// both cgo_tls_{get,set}_gm can be called from runtime
-void (*cgo_load_gm)(void) = cgo_tls_get_gm;
-void (*cgo_save_gm)(void) = cgo_tls_set_gm;
+void (*_cgo_load_gm)(void) = x_cgo_load_gm;
+void (*_cgo_save_gm)(void) = x_cgo_save_gm;
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
- cgo_tls_set_gm(); // save g and m for the initial thread
+ x_cgo_save_gm(); // save g and m for the initial thread
pthread_attr_init(&attr);
pthread_attr_getstacksize(&attr, &size);
pthread_attr_destroy(&attr);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096 * 2;
return sys_pthread_create(thread, attr, thread_start_wrapper, p);
}
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
tcb_fixup(1);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
return sys_pthread_create(thread, attr, thread_start_wrapper, p);
}
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
pthread_attr_t attr;
size_t size;
tcb_fixup(1);
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
pthread_attr_t attr;
sigset_t ign, oset;
ts.g->stackbase = (uintptr)&ts;
/*
- * libcgo_sys_thread_start set stackguard to stack size;
+ * _cgo_sys_thread_start set stackguard to stack size;
* change to actual guard pointer.
*/
ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
#include <stdlib.h>
/* Stub for calling setenv */
-static void
-xlibcgo_setenv(char **arg)
+void
+x_cgo_setenv(char **arg)
{
setenv(arg[0], arg[1], 1);
}
-void (*libcgo_setenv)(char**) = xlibcgo_setenv;
+void (*_cgo_setenv)(char**) = x_cgo_setenv;
#include "libcgo.h"
/* Stub for calling malloc from Go */
-static void
+void
x_cgo_malloc(void *p)
{
struct a {
void (*_cgo_malloc)(void*) = x_cgo_malloc;
/* Stub for calling free from Go */
-static void
+void
x_cgo_free(void *p)
{
struct a {
void (*_cgo_free)(void*) = x_cgo_free;
/* Stub for creating a new thread */
-static void
-xlibcgo_thread_start(ThreadStart *arg)
+void
+x_cgo_thread_start(ThreadStart *arg)
{
ThreadStart *ts;
}
*ts = *arg;
- libcgo_sys_thread_start(ts); /* OS-dependent half */
+ _cgo_sys_thread_start(ts); /* OS-dependent half */
}
-void (*libcgo_thread_start)(ThreadStart*) = xlibcgo_thread_start;
+void (*_cgo_thread_start)(ThreadStart*) = x_cgo_thread_start;
The constant is also hardcoded in cmd/ld/pe.c (keep synchronized). */
#define STACKSIZE (1*1024*1024)
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
int tmp;
g->stackguard = (uintptr)&tmp - STACKSIZE + 8*1024;
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
_beginthread(threadentry, 0, ts);
}
The constant is also hardcoded in cmd/ld/pe.c (keep synchronized). */
#define STACKSIZE (2*1024*1024)
-static void
-xinitcgo(G *g)
+void
+x_cgo_init(G *g)
{
int tmp;
g->stackguard = (uintptr)&tmp - STACKSIZE + 8*1024;
}
-void (*initcgo)(G*) = xinitcgo;
+void (*_cgo_init)(G*) = x_cgo_init;
void
-libcgo_sys_thread_start(ThreadStart *ts)
+_cgo_sys_thread_start(ThreadStart *ts)
{
_beginthread(threadentry, 0, ts);
}
};
/*
- * Arguments to the libcgo_thread_start call.
+ * Arguments to the _cgo_thread_start call.
* Also known to ../pkg/runtime/runtime.h.
*/
typedef struct ThreadStart ThreadStart;
/*
* Called by 5c/6c/8c world.
* Makes a local copy of the ThreadStart and
- * calls libcgo_sys_thread_start(ts).
+ * calls _cgo_sys_thread_start(ts).
*/
-extern void (*libcgo_thread_start)(ThreadStart *ts);
+extern void (*_cgo_thread_start)(ThreadStart *ts);
/*
* Creates the new operating system thread (OS, arch dependent).
*/
-void libcgo_sys_thread_start(ThreadStart *ts);
+void _cgo_sys_thread_start(ThreadStart *ts);
/*
* Call fn in the 6c world.
// _cgoexp_GoF immediately returns to crosscall2, which restores the
// callee-save registers for gcc and returns to GoF, which returns to f.
-void *initcgo; /* filled in by dynamic linker when Cgo is available */
+void *_cgo_init; /* filled in by dynamic linker when Cgo is available */
static int64 cgosync; /* represents possible synchronization in C code */
// These two are only used by the architecture where TLS based storage isn't
// the default for g and m (e.g., ARM)
-void *cgo_load_gm; /* filled in by dynamic linker when Cgo is available */
-void *cgo_save_gm; /* filled in by dynamic linker when Cgo is available */
+void *_cgo_load_gm; /* filled in by dynamic linker when Cgo is available */
+void *_cgo_save_gm; /* filled in by dynamic linker when Cgo is available */
static void unwindm(void);
return nil;
}
-void (*libcgo_setenv)(byte**);
+void (*_cgo_setenv)(byte**);
// Update the C environment if cgo is loaded.
// Called from syscall.Setenv.
{
byte *arg[2];
- if(libcgo_setenv == nil)
+ if(_cgo_setenv == nil)
return;
arg[0] = runtime·malloc(k.len + 1);
runtime·memmove(arg[1], v.str, v.len);
arg[1][v.len] = 0;
- runtime·asmcgocall((void*)libcgo_setenv, arg);
+ runtime·asmcgocall((void*)_cgo_setenv, arg);
runtime·free(arg[0]);
runtime·free(arg[1]);
}
// is enabled, we must remove our seh here.
}
-// When running with cgo, we call libcgo_thread_start
+// When running with cgo, we call _cgo_thread_start
// to start threads for us so that we can play nicely with
// foreign code.
-void (*libcgo_thread_start)(void*);
+void (*_cgo_thread_start)(void*);
typedef struct CgoThreadStart CgoThreadStart;
struct CgoThreadStart
if(runtime·iscgo) {
CgoThreadStart ts;
- if(libcgo_thread_start == nil)
- runtime·throw("libcgo_thread_start missing");
+ if(_cgo_thread_start == nil)
+ runtime·throw("_cgo_thread_start missing");
ts.m = mp;
ts.g = mp->g0;
ts.fn = runtime·mstart;
- runtime·asmcgocall(libcgo_thread_start, &ts);
+ runtime·asmcgocall(_cgo_thread_start, &ts);
} else {
runtime·newosproc(mp, mp->g0, (byte*)mp->g0->stackbase, runtime·mstart);
}
runtime·throw("bad steal");
}
}
-}
\ No newline at end of file
+}
+
TEXT runtime·sigtramp(SB),7,$24
// this might be called in external code context,
// where g and m are not set.
- // first save R0, because cgo_load_gm will clobber it
+ // first save R0, because _cgo_load_gm will clobber it
// TODO(adonovan): call runtime·badsignal if m=0, like other platforms?
MOVW R0, 4(R13) // signum
- MOVW cgo_load_gm(SB), R0
+ MOVW _cgo_load_gm(SB), R0
CMP $0, R0
BL.NE (R0)
TEXT runtime·sigtramp(SB),7,$24
// this might be called in external code context,
// where g and m are not set.
- // first save R0, because cgo_load_gm will clobber it
+ // first save R0, because _cgo_load_gm will clobber it
// TODO(adonovan): call runtime·badsignal if m=0, like other platforms?
MOVW R0, 4(R13)
- MOVW cgo_load_gm(SB), R0
+ MOVW _cgo_load_gm(SB), R0
CMP $0, R0
BL.NE (R0)
TEXT runtime·sigtramp(SB),7,$24
// this might be called in external code context,
// where g and m are not set.
- // first save R0, because cgo_load_gm will clobber it
+ // first save R0, because _cgo_load_gm will clobber it
// TODO(adonovan): call runtime·badsignal if m=0, like other platforms?
MOVW R0, 4(R13) // signum
- MOVW cgo_load_gm(SB), R0
+ MOVW _cgo_load_gm(SB), R0
CMP $0, R0
BL.NE (R0)