confirm all the `//go:linkname` usages to be 'handshake' or 'push'
hajimehoshi opened this issue · 1 comments
hajimehoshi commented
Operating System
- Windows
- macOS
- Linux
- FreeBSD
- Android
- iOS
What feature would you like to be added?
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
.
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
Why is this needed?
For availability with Go 1.23.
hajimehoshi commented
Duplicated with #247