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

all: cleanup ineffectual //go:linkname directives #42938

Closed
mdempsky opened this issue Dec 2, 2020 · 6 comments
Closed

all: cleanup ineffectual //go:linkname directives #42938

mdempsky opened this issue Dec 2, 2020 · 6 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@mdempsky
Copy link
Member

mdempsky commented Dec 2, 2020

There are a lot of //go:linkname directives in macOS packages that don't do anything. We should remove them.

To elaborate, a directive like //go:linkname foo bar sets the Go variable or function named foo to use bar as its linker symbol (instead of mypkgpath.foo, like it would normally use). But if there's no Go variable or function named foo, it just silently doesn't do anything.

In CL 273986 (2d6ff99), I removed the occurrences within the standard library, but there are more in the vendored x/sys package that need to be fixed. There might be more instances in other repos too.

To test for problems, you can checkout the dev.regabi branch; revert CL 274732 (42e46f4); and then build packages like golang.org/x/sys/unix w/ various GOOS/GOARCH combinations.

@mdempsky mdempsky added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 2, 2020
@mdempsky mdempsky added this to the Go1.17 milestone Dec 2, 2020
@gopherbot
Copy link

Change https://golang.org/cl/274732 mentions this issue: [dev.regabi] cmd/compile: comment out //go:linkname warning

@mdempsky mdempsky added help wanted Suggested Issues that may be good for new contributors looking for work to do. labels Dec 2, 2020
gopherbot pushed a commit that referenced this issue Dec 2, 2020
It's noisy and not doing any harm, and we still have an entire release
cycle to revisit and address the issue properly.

Updates #42938

Change-Id: I1de5cfb495a8148c9c08b215deba38f2617fb467
Reviewed-on: https://go-review.googlesource.com/c/go/+/274732
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
@gopherbot
Copy link

Change https://golang.org/cl/274573 mentions this issue: unix: remove ineffectual //go:linkname directives

gopherbot pushed a commit to golang/sys that referenced this issue Dec 2, 2020
For golang/go#42938

Change-Id: I9d68a2436f3ce7402b3c6517a630d0272cf39071
Reviewed-on: https://go-review.googlesource.com/c/sys/+/274573
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
@ianlancetaylor
Copy link
Contributor

Is there more to do here? Are we going to do anything further for the 1.17 release?

@dmitshur
Copy link
Contributor

We're three weeks into the release freeze now. It seems this is either mostly done, or if there's more to do, progress can be continued in a future Go release, so I'll move it to Backlog. @mdempsky Please feel free to update the issue as needed.

@dmitshur dmitshur modified the milestones: Go1.17, Backlog May 21, 2021
@cuonglm
Copy link
Member

cuonglm commented May 27, 2022

@mdempsky seems we can close this issue now?

@Ebi-web
Copy link

Ebi-web commented Dec 27, 2022

ping

@golang golang locked and limited conversation to collaborators Dec 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

6 participants