diff options
| author | majiang <ma.jiang@zte.com.cn> | 2018-11-16 15:39:59 +0000 |
|---|---|---|
| committer | Lynn Boger <laboger@linux.vnet.ibm.com> | 2018-11-20 14:50:09 +0000 |
| commit | 1135071b47b1c9c0069d384c136e94d2883282bc (patch) | |
| tree | 171c9974d402694882265d1e647d1f1ab3140b91 /src/runtime/rt0_linux_ppc64.s | |
| parent | 2cc6d62d666f49d91c6d088bcba3ef18072d093f (diff) | |
| download | go-1135071b47b1c9c0069d384c136e94d2883282bc.tar.xz | |
cmd/link, runtime: add initial cgo support for ppc64
We should be able to build docker after this get applied.
Updates #13192
Change-Id: I5378d3518fac52d6bd4c97828884c1b382b7ace5
GitHub-Last-Rev: 210b7bc2e172f641f1102982e04542bf73a1aa46
GitHub-Pull-Request: golang/go#28546
Reviewed-on: https://go-review.googlesource.com/c/146898
Reviewed-by: Jiang Ma <ma.jiang@zte.com.cn>
Reviewed-by: Clément Chigot <clement.chigot@atos.net>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/rt0_linux_ppc64.s')
| -rw-r--r-- | src/runtime/rt0_linux_ppc64.s | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/runtime/rt0_linux_ppc64.s b/src/runtime/rt0_linux_ppc64.s index f814515438..1265b15853 100644 --- a/src/runtime/rt0_linux_ppc64.s +++ b/src/runtime/rt0_linux_ppc64.s @@ -6,6 +6,11 @@ TEXT _rt0_ppc64_linux(SB),NOSPLIT,$0 DWORD $0 DWORD $0 +TEXT main(SB),NOSPLIT,$0 + DWORD $_main<>(SB) + DWORD $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 @@ -13,11 +18,13 @@ TEXT _main<>(SB),NOSPLIT,$-8 // 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) - -TEXT main(SB),NOSPLIT,$-8 MOVD $runtime·rt0_go(SB), R12 MOVD R12, CTR + MOVBZ runtime·iscgo(SB), R5 + CMP R5, $0 + BEQ nocgo + BR (CTR) +nocgo: + MOVD 0(R1), R3 // argc + ADD $8, R1, R4 // argv BR (CTR) |
