Skip to content

Commit

Permalink
[release-branch.go1.18] runtime: fix ppc64 startup on newer linux ker…
Browse files Browse the repository at this point in the history
…nels

R0 needs to be cleared at startup as it may not always be cleared
by the kernel on newer kernels.

Fixes #54664

Change-Id: Id7055699aaa8d8b193b7e3e784f075ce29ac3f1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/424927
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Lynn Boger <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: David Chase <[email protected]>
Run-TryBot: Paul Murphy <[email protected]>
Reviewed-on: https://go-review.googlesource.com/c/go/+/425369
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
pmur authored and heschi committed Aug 31, 2022
1 parent d2d5929 commit da8a350
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtime/rt0_linux_ppc64.s
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ TEXT _main<>(SB),NOSPLIT,$-8
// There is no TLS base pointer.
//
// TODO(austin): Support ABI v1 dynamic linking entry point
XOR R0, R0 // Note, newer kernels may not always set R0 to 0.
MOVD $runtime·rt0_go(SB), R12
MOVD R12, CTR
MOVBZ runtime·iscgo(SB), R5
Expand Down

0 comments on commit da8a350

Please sign in to comment.