mirror of
https://github.com/golang/go.git
synced 2026-02-06 10:55:05 +03:00
runtime: fix aix/ppc64 library initialization
AIX sets the argc and argv parameters in R14 and R15, but _rt0_ppc64x_lib expects them to be in R3 and R4. Also, call reginit in _rt0_ppc64x_lib. These issues were oversights from CL 706395 which went unnoticed because there if no LUCI aix/ppc64 builder (see #67299). Change-Id: I93a2798739935fbcead3e6162b4b90db7e740aa5 Reviewed-on: https://go-review.googlesource.com/c/go/+/708255 Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Paul Murphy <paumurph@redhat.com>
This commit is contained in:
@@ -21,6 +21,9 @@ TEXT _rt0_ppc64x_lib(SB),NOSPLIT|NOFRAME,$0
|
||||
MOVD R4, _rt0_ppc64x_lib_argv<>(SB)
|
||||
|
||||
// Synchronous initialization.
|
||||
MOVD $runtime·reginit(SB), R12
|
||||
MOVD R12, CTR
|
||||
BL (CTR)
|
||||
MOVD $runtime·libpreinit(SB), R12
|
||||
MOVD R12, CTR
|
||||
BL (CTR)
|
||||
|
||||
@@ -42,4 +42,6 @@ TEXT _main(SB),NOSPLIT,$-8
|
||||
BR (CTR)
|
||||
|
||||
TEXT _rt0_ppc64_aix_lib(SB),NOSPLIT,$0
|
||||
MOVD R14, R3 // argc
|
||||
MOVD R15, R4 // argv
|
||||
JMP _rt0_ppc64x_lib(SB)
|
||||
|
||||
Reference in New Issue
Block a user