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>
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)
BR (CTR)
TEXT _rt0_ppc64_aix_lib(SB),NOSPLIT,$0
+ MOVD R14, R3 // argc
+ MOVD R15, R4 // argv
JMP _rt0_ppc64x_lib(SB)