-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime/cgo: fix calls from C to go on linux/ppc64 #58976
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
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: 7033ce0) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/475495 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 1: Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Gopher Robot: Patch Set 1: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
The "elf ABI v1" code in crosscall2 was incorrect because fn is not a C function but a go function, and therefore does not comply with the ELF ABI.
This PR (HEAD: dcae630) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/475495 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 2: Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Gopher Robot: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Gopher Robot: Patch Set 2: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Paul Murphy: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Cherry Mui: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Cherry Mui: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Marcus Comstedt: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Paul Murphy: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Marcus Comstedt: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Marcus Comstedt: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Lynn Boger: Patch Set 2: Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
Message from Gopher Robot: Patch Set 2: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/475495. |
This fix makes cgo work correctly on linux/ppc64 (big endian). I tested it on Gentoo linux/ppc64 (ELF ABI v1)
with https://github.com/andreiavrammsd/cgo-examples.git and with Docker.
While I can't test if the removed code was somehow correct for the AIX case, I very much doubt that would be the case.