]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: declare variable setg_gcc as static
authorerifan01 <eric.fang@arm.com>
Wed, 17 Apr 2019 01:44:24 +0000 (01:44 +0000)
committerIan Lance Taylor <iant@golang.org>
Thu, 18 Apr 2019 00:06:12 +0000 (00:06 +0000)
variable setg_gcc in runtime/cgo/*.c should be static, otherwise it
will be mixed with the function of the same name in runtime/asm_*.s or
tls_*.s, which causes an error when building PIE with internal linking
mode.

Fixes #31485

Change-Id: I79b311ffcaf450984328db65397840ae7d85e65d
Reviewed-on: https://go-review.googlesource.com/c/go/+/172498
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/cgo/gcc_darwin_arm.c
src/runtime/cgo/gcc_darwin_arm64.c
src/runtime/cgo/gcc_linux_arm.c
src/runtime/cgo/gcc_linux_arm64.c
src/runtime/cgo/gcc_linux_mips64x.c
src/runtime/cgo/gcc_linux_mipsx.c

index dd7d4f90e1bd063d3c87e54f2d5495f6840e148d..b1e2502b5d347b849b596840db0936294b2dd3fe 100644 (file)
@@ -47,7 +47,7 @@ inittls(void **tlsg, void **tlsbase)
 }
 
 static void *threadentry(void*);
-void (*setg_gcc)(void*);
+static void (*setg_gcc)(void*);
 
 void
 _cgo_sys_thread_start(ThreadStart *ts)
index c99725d2d6d91ea967c8043b82bb507e4f57c390..a0f75910c8fa0e0050ec05a014fd80c9f6853c25 100644 (file)
@@ -48,7 +48,7 @@ inittls(void **tlsg, void **tlsbase)
 }
 
 static void *threadentry(void*);
-void (*setg_gcc)(void*);
+static void (*setg_gcc)(void*);
 
 void
 _cgo_sys_thread_start(ThreadStart *ts)
index 870a8a4a82ab8bb459b55bedf32b2e37208d2260..61855b96b227ea310c36f8e49fab2d7f0e34ab6b 100644 (file)
@@ -11,7 +11,7 @@
 static void *threadentry(void*);
 
 void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
-void (*setg_gcc)(void*);
+static void (*setg_gcc)(void*);
 
 void
 _cgo_sys_thread_start(ThreadStart *ts)
index 8630f2f03e36f02a7d324e109374f2ad12b5bd43..261c884ac95982ab578727359cc4f87bd02fdbe3 100644 (file)
@@ -13,7 +13,7 @@
 static void *threadentry(void*);
 
 void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
-void (*setg_gcc)(void*);
+static void (*setg_gcc)(void*);
 
 void
 _cgo_sys_thread_start(ThreadStart *ts)
index afcd3234e8cea134355efb22510b383cfa00908d..42837b14df54aebe97a7be7256d9f58d44367ed4 100644 (file)
@@ -15,7 +15,7 @@
 static void *threadentry(void*);
 
 void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
-void (*setg_gcc)(void*);
+static void (*setg_gcc)(void*);
 
 void
 _cgo_sys_thread_start(ThreadStart *ts)
index 2a5f64a7275160ef36be553088fc83e13329e7cc..a44ea3057da44e3fd297e2539c10c04cfa754af6 100644 (file)
@@ -15,7 +15,7 @@
 static void *threadentry(void*);
 
 void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
-void (*setg_gcc)(void*);
+static void (*setg_gcc)(void*);
 
 void
 _cgo_sys_thread_start(ThreadStart *ts)