From af7ca8dce4991860263d5e0d0322461cfd00c599 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 16 Dec 2014 18:34:55 -0500 Subject: cmd/cgo, runtime/cgo: support ppc64 This implements support for calls to and from C in the ppc64 C ABI, as well as supporting functionality such as an entry point from the dynamic linker. Change-Id: I68da6df50d5638cb1a3d3fef773fb412d7bf631a Reviewed-on: https://go-review.googlesource.com/2009 Reviewed-by: Russ Cox --- src/runtime/rt0_linux_ppc64.s | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/runtime/rt0_linux_ppc64.s') diff --git a/src/runtime/rt0_linux_ppc64.s b/src/runtime/rt0_linux_ppc64.s index 33bbbbd1bf..33e973db96 100644 --- a/src/runtime/rt0_linux_ppc64.s +++ b/src/runtime/rt0_linux_ppc64.s @@ -7,6 +7,12 @@ TEXT _rt0_ppc64_linux(SB),NOSPLIT,$0 DWORD $0 TEXT _main<>(SB),NOSPLIT,$-8 + // In a statically linked binary, the stack contains argc, + // argv as argc string pointers followed by a NULL, envv as a + // sequence of string pointers followed by a NULL, and auxv. + // There is no TLS base pointer. + // + // TODO(austin): Support ABI v1 dynamic linking entry point MOVD 0(R1), R3 // argc ADD $8, R1, R4 // argv BR main(SB) -- cgit v1.3-5-g9baa