diff options
| author | Paul Murphy <murp@redhat.com> | 2026-01-07 13:48:53 -0600 |
|---|---|---|
| committer | Paul Murphy <murp@redhat.com> | 2026-01-30 08:06:41 -0800 |
| commit | 35c5deb1d43b245c19059d1532929ee087e44a84 (patch) | |
| tree | a0cbc862f9933c9b781b340eb8acef60d629f954 /src/runtime/sys_linux_ppc64x.s | |
| parent | afae85307206cb56851c31652bd9ae45ba60c800 (diff) | |
| download | go-35c5deb1d43b245c19059d1532929ee087e44a84.tar.xz | |
all: switch linux-ppc64 target to ELFv2 ABI
Go is only capable of producing internally linked, static binaries
on linux-ppc64. As such, binaries should run in either ELFv1 or
ELFv2 ppc64 userspaces today.
This opens the door to enabling cgo and external linking which
will require ELFv2 support and userspace, eventually.
Fixes #76244
Change-Id: I5ca15037cbe546f352e8693dcf14da51a308b8ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/734540
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/runtime/sys_linux_ppc64x.s')
| -rw-r--r-- | src/runtime/sys_linux_ppc64x.s | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s index 8735b932ed..5ecfb0ec62 100644 --- a/src/runtime/sys_linux_ppc64x.s +++ b/src/runtime/sys_linux_ppc64x.s @@ -447,13 +447,12 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$0-32 MOVD 24(R1), R2 RET -#ifdef GO_PPC64X_HAS_FUNCDESC -DEFINE_PPC64X_FUNCDESC(runtime·sigtramp, sigtramp<>) +#ifdef GOARCH_ppc64 // cgo isn't supported on ppc64, but we need to supply a cgoSigTramp function. -DEFINE_PPC64X_FUNCDESC(runtime·cgoSigtramp, sigtramp<>) -TEXT sigtramp<>(SB),NOSPLIT|NOFRAME|TOPFRAME,$0 -#else -// ppc64le doesn't need function descriptors +TEXT runtime·cgoSigtramp(SB),NOSPLIT|NOFRAME,$0 + BR runtime·sigtramp(SB) +#endif + // Save callee-save registers in the case of signal forwarding. // Same as on ARM64 https://golang.org/issue/31827 . // @@ -461,7 +460,6 @@ TEXT sigtramp<>(SB),NOSPLIT|NOFRAME|TOPFRAME,$0 // a function pointer) as R2 may not be preserved when calling this // function. In those cases, the caller preserves their R2. TEXT runtime·sigtramp(SB),NOSPLIT|NOFRAME,$0 -#endif // This is called with ELF calling conventions. Convert to Go. // Allocate space for argument storage to call runtime.sigtrampgo. STACK_AND_SAVE_HOST_TO_GO_ABI(32) |
