Commit 9aea0e89 authored by Carlos Eduardo Seo's avatar Carlos Eduardo Seo Committed by Lynn Boger

runtime: make sure R0 is zero before _main on ppc64le

_main has an early check to verify if a binary is statically or dynamically
linked that depends on R0 being zero. R0 is not guaranteed to be zero at that
point and this was breaking Go on Alpine for ppc64le.

Change-Id: I4a1059ff7fd3db6fc489e7dcfe631c1814dd965b
Reviewed-on: https://go-review.googlesource.com/54730
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: 's avatarLynn Boger <laboger@linux.vnet.ibm.com>
parent 98031d8c
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "textflag.h" #include "textflag.h"
TEXT _rt0_ppc64le_linux(SB),NOSPLIT,$0 TEXT _rt0_ppc64le_linux(SB),NOSPLIT,$0
XOR R0, R0 // Make sure R0 is zero before _main
BR _main<>(SB) BR _main<>(SB)
TEXT _rt0_ppc64le_linux_lib(SB),NOSPLIT,$-8 TEXT _rt0_ppc64le_linux_lib(SB),NOSPLIT,$-8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment