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

Check //go:linkname usage #64

Open
cuonglm opened this issue May 16, 2024 · 1 comment
Open

Check //go:linkname usage #64

cuonglm opened this issue May 16, 2024 · 1 comment

Comments

@cuonglm
Copy link
Contributor

cuonglm commented May 16, 2024

The runtime.go is using //go:linkname to access runtime function: https://github.com/orijtech/structslop/blob/master/runtime.go

According to golang/go#67401, we should find a better way or keep thing works with future releases.

@atc0005
Copy link
Contributor

atc0005 commented Aug 14, 2024

FWIW, as a workaround for building using Go 1.23 you can use -ldflags=-checklinkname=0.

Examples:

  • go install -ldflags=-checklinkname=0 ./cmd/structslop
  • go build -ldflags=-checklinkname=0 ./cmd/structslop

EDIT:

Leaving this note for future me and any others coming across this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants