libgo patch committed: Fix type descriptor name in C code

Ian Lance Taylor iant@golang.org
Wed Jan 31 19:05:00 GMT 2018


The big GO symbol rename missed a case in libgo's C code, in the
fieldtrack support.  This patch fixes it.  Bootstrapped and ran Go
testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian
-------------- next part --------------
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 257247)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-00f87806635655339dbbca59e6ae2ea8231cf9b1
+17325c96ccbee4ad6bed1cd3d9517f7dfbdf3ea7
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/runtime/go-fieldtrack.c
===================================================================
--- libgo/runtime/go-fieldtrack.c	(revision 257217)
+++ libgo/runtime/go-fieldtrack.c	(working copy)
@@ -46,7 +46,9 @@ extern void *mapassign (const struct __g
   __asm__ (GOSYM_PREFIX "runtime.mapassign");
 
 // The type descriptor for map[string] bool.  */
-extern const char __go_td_MN6_string__N4_bool[] __attribute__ ((weak));
+extern const char map_string_bool[] __attribute__ ((weak));
+extern const char map_string_bool[]
+  __asm__ (GOSYM_PREFIX "type..map.6string.7bool");
 
 void runtime_Fieldtrack (void *) __asm__ (GOSYM_PREFIX "runtime.Fieldtrack");
 
@@ -58,7 +60,7 @@ runtime_Fieldtrack (void *m)
   const char *prefix;
   size_t prefix_len;
 
-  if (__go_td_MN6_string__N4_bool == NULL)
+  if (map_string_bool == NULL)
     return;
 
   p = __data_start;
@@ -107,7 +109,7 @@ runtime_Fieldtrack (void *m)
 
 	  s.str = (const byte *) q1;
 	  s.len = q2 - q1;
-	  p = mapassign((const void*) __go_td_MN6_string__N4_bool, m, &s);
+	  p = mapassign((const void*) map_string_bool, m, &s);
 	  *(_Bool*)p = 1;
 	}
 


More information about the Gcc-patches mailing list