runtime/cgo: fix calls from C to go on linux/ppc64#58976
runtime/cgo: fix calls from C to go on linux/ppc64#58976zeldin wants to merge 2 commits intogolang:masterfrom
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.