aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cgo/gcc_libinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/cgo/gcc_libinit.c')
-rw-r--r--src/runtime/cgo/gcc_libinit.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/runtime/cgo/gcc_libinit.c b/src/runtime/cgo/gcc_libinit.c
index 4b163c2d19..9d2402636e 100644
--- a/src/runtime/cgo/gcc_libinit.c
+++ b/src/runtime/cgo/gcc_libinit.c
@@ -83,30 +83,6 @@ _cgo_wait_runtime_init_done(void) {
return 0;
}
-// _cgo_set_stacklo sets g->stacklo based on the stack size.
-// This is common code called from x_cgo_init, which is itself
-// called by rt0_go in the runtime package.
-void _cgo_set_stacklo(G *g, uintptr *pbounds)
-{
- uintptr bounds[2];
-
- // pbounds can be passed in by the caller; see gcc_linux_amd64.c.
- if (pbounds == NULL) {
- pbounds = &bounds[0];
- }
-
- x_cgo_getstackbound(pbounds);
-
- g->stacklo = *pbounds;
-
- // Sanity check the results now, rather than getting a
- // morestack on g0 crash.
- if (g->stacklo >= g->stackhi) {
- fprintf(stderr, "runtime/cgo: bad stack bounds: lo=%p hi=%p\n", (void*)(g->stacklo), (void*)(g->stackhi));
- abort();
- }
-}
-
// Store the g into a thread-specific value associated with the pthread key pthread_g.
// And pthread_key_destructor will dropm when the thread is exiting.
void x_cgo_bindm(void* g) {