1
0
mirror of https://github.com/golang/go synced 2024-11-23 00:20:12 -07:00
go/misc/cgo
Lynn Boger bade680867 runtime/cgo: fix crosscall2 on ppc64x
Some uses of crosscall2 did not work on ppc64le and probably
aix-ppc64. In particular, if there was a main program compiled
with -buildmode=pie and used a plugin which invoked crosscall2,
then failures could occur due to R2 getting set incorrectly along the
way. The problem was due to R2 being saved on the caller's
stack; it is now saved on the crosscall2 stack. More details can be
found in the issue.

This adds a testcase where the main program is built with pie
and the plugin invokes crosscall2.

This also changes the save of the CR bits from MOVD to MOVW as
it should be.

Fixes #43228

Change-Id: Ib5673e25a2ec5ee46bf9a1ffb0cb1f3ef5449086
Reviewed-on: https://go-review.googlesource.com/c/go/+/319489
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Heschi Kreinick <heschi@google.com>
2021-05-17 15:57:52 +00:00
..
errors cmd/cgo: pass end position info for C function arguments. 2021-04-05 19:29:17 +00:00
fortran misc/cgo/fortran: avoid writing to $PWD 2019-11-20 22:37:23 +00:00
gmp
life all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
nocgo
stdio all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
test misc/cgo/test: do not redeclare exported Go functions 2021-04-23 21:42:52 +00:00
testasan misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testcarchive all: simplify the spelling of Linux 2021-04-13 13:56:21 +00:00
testcshared all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
testgodefs all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
testplugin runtime/cgo: fix crosscall2 on ppc64x 2021-05-17 15:57:52 +00:00
testsanitizers all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
testshared all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
testsigfwd misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testso misc/cgo/testso, misc/cgo/testsovar: fix for Windows 2021-04-23 21:48:41 +00:00
testsovar misc/cgo/testso, misc/cgo/testsovar: fix for Windows 2021-04-23 21:48:41 +00:00
testtls