The go:linkname way works with Go 1.17 (with regabi), too. Upstream did this in 2015 in 0b8d583320 See also https://sitano.github.io/2016/04/28/golang-private/ for more background about both techniques.
0b8d583320