Commit 4312a18b authored by erifan01's avatar erifan01 Committed by Ian Lance Taylor

runtime/cgo: declare variable setg_gcc as static

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/+/172498Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 3b37ff45
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment