1
0
mirror of https://github.com/golang/go synced 2024-11-23 15:30:05 -07:00
go/misc/cgo
Cuong Manh Le bcd82125f8 cmd/compile: re-compile instantiated generic methods in linkshared mode
For G[T] that was seen and compiled in imported package, it is not added
to typecheck.Target.Decls, prevent wasting compile time re-creating
DUPOKS symbols. However, the linker do not support a type symbol
referencing a method symbol across DSO boundary. That causes unreachable
sym error when building under -linkshared mode.

To fix it, always re-compile generic methods in linkshared mode.

Fixes #58966

Change-Id: I894b417cfe8234ae1fe809cc975889345df22cef
Reviewed-on: https://go-review.googlesource.com/c/go/+/477375
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-03-22 04:04:11 +00:00
..
errors runtime: reimplement GODEBUG=cgocheck=2 as a GOEXPERIMENT 2023-02-16 00:16:24 +00:00
fortran misc/cgo/fortran: convert to Go test 2022-10-17 15:15:37 +00:00
gmp all: gofmt main repo 2022-04-11 16:34:30 +00:00
life misc/cgo/{life,stdio}: remove reliance on test/run.go 2023-02-28 01:11:11 +00:00
nocgo
stdio misc/cgo/{life,stdio}: remove reliance on test/run.go 2023-02-28 01:11:11 +00:00
test cmd/cgo: walk {FuncType,TypeSpec}.TypeParams fields 2022-11-30 21:45:10 +00:00
testcarchive cmd/dist,internal/platform: reenable the c-archive build mode on ios 2023-02-01 19:47:35 +00:00
testcshared misc/cgo/testcshared: reapply CL 451816 2022-11-22 02:27:05 +00:00
testgodefs cmd/cgo: retain original file paths in godefs generated comment 2022-04-03 07:18:10 +00:00
testplugin cmd/compile: make jump table symbol local 2022-07-22 20:12:19 +00:00
testsanitizers runtime/cgo: add tsan sync for traceback function 2023-03-08 20:11:59 +00:00
testshared cmd/compile: re-compile instantiated generic methods in linkshared mode 2023-03-22 04:04:11 +00:00
testso all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testsovar all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testtls all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00