diff options
| author | erifan01 <eric.fang@arm.com> | 2019-04-17 01:44:24 +0000 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2019-04-18 00:06:12 +0000 |
| commit | 4312a18b8a1d7d35dcc45cdf4280260c3933a2ed (patch) | |
| tree | 579bba7408173a6784a6351cc86200fb70767a66 /src/runtime/cgo | |
| parent | 3b37ff453edd9664045e656d1c02e63703517399 (diff) | |
| download | go-4312a18b8a1d7d35dcc45cdf4280260c3933a2ed.tar.xz | |
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/+/172498
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/cgo')
| -rw-r--r-- | src/runtime/cgo/gcc_darwin_arm.c | 2 | ||||
| -rw-r--r-- | src/runtime/cgo/gcc_darwin_arm64.c | 2 | ||||
| -rw-r--r-- | src/runtime/cgo/gcc_linux_arm.c | 2 | ||||
| -rw-r--r-- | src/runtime/cgo/gcc_linux_arm64.c | 2 | ||||
| -rw-r--r-- | src/runtime/cgo/gcc_linux_mips64x.c | 2 | ||||
| -rw-r--r-- | src/runtime/cgo/gcc_linux_mipsx.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/cgo/gcc_darwin_arm.c b/src/runtime/cgo/gcc_darwin_arm.c index dd7d4f90e1..b1e2502b5d 100644 --- a/src/runtime/cgo/gcc_darwin_arm.c +++ b/src/runtime/cgo/gcc_darwin_arm.c @@ -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) diff --git a/src/runtime/cgo/gcc_darwin_arm64.c b/src/runtime/cgo/gcc_darwin_arm64.c index c99725d2d6..a0f75910c8 100644 --- a/src/runtime/cgo/gcc_darwin_arm64.c +++ b/src/runtime/cgo/gcc_darwin_arm64.c @@ -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) diff --git a/src/runtime/cgo/gcc_linux_arm.c b/src/runtime/cgo/gcc_linux_arm.c index 870a8a4a82..61855b96b2 100644 --- a/src/runtime/cgo/gcc_linux_arm.c +++ b/src/runtime/cgo/gcc_linux_arm.c @@ -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) diff --git a/src/runtime/cgo/gcc_linux_arm64.c b/src/runtime/cgo/gcc_linux_arm64.c index 8630f2f03e..261c884ac9 100644 --- a/src/runtime/cgo/gcc_linux_arm64.c +++ b/src/runtime/cgo/gcc_linux_arm64.c @@ -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) diff --git a/src/runtime/cgo/gcc_linux_mips64x.c b/src/runtime/cgo/gcc_linux_mips64x.c index afcd3234e8..42837b14df 100644 --- a/src/runtime/cgo/gcc_linux_mips64x.c +++ b/src/runtime/cgo/gcc_linux_mips64x.c @@ -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) diff --git a/src/runtime/cgo/gcc_linux_mipsx.c b/src/runtime/cgo/gcc_linux_mipsx.c index 2a5f64a727..a44ea3057d 100644 --- a/src/runtime/cgo/gcc_linux_mipsx.c +++ b/src/runtime/cgo/gcc_linux_mipsx.c @@ -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) |
