You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/compile: "missing function body" error when using the //go:linkname compiler directive #23408
On 11 Jan 2018, at 22:43, bigfg ***@***.***> wrote:
For example let's say (hypothetically) that I wanted to call the strhash function defined in the runtime package, I could do:
`package key
import "unsafe"
//go:linkname strhash runtime.strhash
func strhash(a unsafe.Pointer, h uintptr) uintptr
func hash(s string) uintptr {
return strhash(unsafe.Pointer(&s), 0)
}`
actually, I try to fix this with:
flag.BoolVar(&completeFlag, "complete", true, "compiling complete package")
But it doesn't seem to work.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Activity
davecheney commentedon Jan 11, 2018
crvv commentedon Jan 12, 2018
This looks like a duplicate of #23311
davecheney commentedon Jan 12, 2018
Closing as answered.