This patch by Cherry Zhang changes libgo to mark the memequal and
memclrNoHeapPointers functions as nosplit.  They are wrappers of libc
functions that use no stack.  Mark them nosplit so the linker won't
patch it to call __morestack_non_split.  Bootstrapped and ran Go
testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 272624)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-89b442a0100286ee569b8d2562ce1b2ea602f7e7
+a857aad2f3994e6fa42a6fc65330e65d209597a0
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/runtime/go-memclr.c
===================================================================
--- libgo/runtime/go-memclr.c   (revision 272608)
+++ libgo/runtime/go-memclr.c   (working copy)
@@ -7,7 +7,8 @@
 #include "runtime.h"
 
 void memclrNoHeapPointers(void *, uintptr)
-  __asm__ (GOSYM_PREFIX "runtime.memclrNoHeapPointers");
+  __asm__ (GOSYM_PREFIX "runtime.memclrNoHeapPointers")
+  __attribute__ ((no_split_stack));
 
 void
 memclrNoHeapPointers (void *p1, uintptr len)
Index: libgo/runtime/go-memequal.c
===================================================================
--- libgo/runtime/go-memequal.c (revision 272608)
+++ libgo/runtime/go-memequal.c (working copy)
@@ -7,7 +7,8 @@
 #include "runtime.h"
 
 _Bool memequal (void *, void *, uintptr)
-  __asm__ (GOSYM_PREFIX "runtime.memequal");
+  __asm__ (GOSYM_PREFIX "runtime.memequal")
+  __attribute__ ((no_split_stack));
 
 _Bool
 memequal (void *p1, void *p2, uintptr len)

Reply via email to