]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: disable weak reference in itab if build with "-linkshared"
authorzhouguangyuan <zhouguangyuan.xian@gmail.com>
Wed, 15 Sep 2021 18:10:17 +0000 (02:10 +0800)
committerAlexander Rakoczy <alex@golang.org>
Wed, 13 Oct 2021 15:12:46 +0000 (15:12 +0000)
commitf687831e4cfa06d19533d47ae93c0451bd1ca688
treea5ea7f09d0b01c436f55cd46a686740f89bdc937
parent0454d7346f4ca89261356d3f17da11ab5bc643c5
cmd/link: disable weak reference in itab if build with "-linkshared"

When build with "-linkshared", we can't tell if the interface method will be used or not. It can be used in shared library.

Fixes #47873

Change-Id: Iba12812f199b7679cf2fd41a304268d6d6dd03c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/350189
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Alexander Rakoczy <alex@golang.org>
misc/cgo/testshared/shared_test.go
misc/cgo/testshared/testdata/issue47837/a/a.go [new file with mode: 0644]
misc/cgo/testshared/testdata/issue47837/main/main.go [new file with mode: 0644]
src/cmd/link/internal/ld/deadcode.go