Closed hajimehoshi closed 1 month ago
https://github.com/golang/go/issues/67401
IIUC, we can no longer use the 'pull' usage of //go:linkname (i.e., we cannot pull an unexported symbol by //go:linkname that is not pushed by //go:linkname). As we discussed on the Discord server, what we should take care is cgocall and noescape.
//go:linkname
cgocall
noescape
Push //go:linkname _cgo_setenv runtime._cgo_setenv //go:linkname _cgo_unsetenv runtime._cgo_unsetenv //go:linkname _cgo_init _cgo_init //go:linkname _cgo_thread_start _cgo_thread_start //go:linkname _cgo_notify_runtime_init_done _cgo_notify_runtime_init_done //go:linkname _cgo_pthread_key_created _cgo_pthread_key_created //go:linkname _set_crosscall2 runtime.set_crosscall2 //go:linkname _cgo_bindm _cgo_bindm Pull //go:linkname runtime_cgocall runtime.cgocall //go:linkname runtime_noescape runtime.noescape
For availability with Go 1.23.
Duplicated with #247
Operating System
What feature would you like to be added?
https://github.com/golang/go/issues/67401
IIUC, we can no longer use the 'pull' usage of
//go:linkname
(i.e., we cannot pull an unexported symbol by//go:linkname
that is not pushed by//go:linkname
). As we discussed on the Discord server, what we should take care iscgocall
andnoescape
.Why is this needed?
For availability with Go 1.23.