cmd/link: provide meaningful error message if -linkmode=external is attempted with GOARCH=ppc64 #25079
Labels
Milestone
Comments
Probably cmd/link/internal/ld/config.go. |
Here are two examples of how this fails now:
This is just a warning, and a dynamic binary is built, but the binary won't run because it hasn't been built according to the ppc64 v1 ABI and the dynamic linker fails:
This message is not very useful, I believe it occurs because of this code in go/build/build.go:
|
Change https://golang.org/cl/109915 mentions this issue: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?tip
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?ppc64
Support was never added to golang for the ppc64 v1 ABI, so if files are generated that require the external linker on any ppc64 big endian machine, it will likely fail in some way where it is not always obvious why, and then users are confused.
Seems like golang should be able to provide an error message when an attempt is made to use -linkmode=external with GOARCH=ppc64. I think there are already cases where the use of unsupported linkmodes are flagged. I can make the change it if someone can advise where best it should go.
The text was updated successfully, but these errors were encountered: