-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/link: panic with cgo export and //go:linkname when main.main not declared #46255
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
Comments
Change https://golang.org/cl/321130 mentions this issue: |
it's also reproducible in arm64:
|
Thanks. I will update the patch. |
This kind of use of linkname is not supported. Is there a way of reproduce without using linkname? Thanks. |
yes, i know this is not a valid go program(as i said before, i forgot to write a unfortunately i couldn't reproduce it without linkname. |
by the way, i'm trying to compile a go program as a android/ios library, and call the |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
the sample code is there:
and i forgot to declare a main function, then build it with
go build -buildmode=c-archive
What did you expect to see?
What did you see instead?
go linker panic:
The text was updated successfully, but these errors were encountered: