Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

confirm all the //go:linkname usages to be 'handshake' or 'push' #248

Closed
6 tasks
hajimehoshi opened this issue May 16, 2024 · 1 comment
Closed
6 tasks
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@hajimehoshi
Copy link
Member

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • Android
  • iOS

What feature would you like to be added?

golang/go#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.

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
Copy link
Member Author

Duplicated with #247

@hajimehoshi hajimehoshi closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@hajimehoshi hajimehoshi added the duplicate This issue or pull request already exists label May 16, 2024
@hajimehoshi hajimehoshi removed this from the v0.8.0 milestone May 16, 2024
@hajimehoshi hajimehoshi changed the title confirm all the //go:linkname usages 'handshake' or 'push' confirm all the //go:linkname usages to be 'handshake' or 'push' May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants