cmd, runtime: fix C trampolines on aix/ppc64
C trampolines are made by fixup CSECTS which are added between two symbols. If such CSECTS is added inside Go functions, all method offsets stored in moduledatas will be wrong. In order to prevent this, every C code is moved at the end of the executable and long calls are created for GO functions called by C code. The main function can't longer be made in Go as AIX __start isn't using a long call to branch on it. Therefore, a main is defined on runtime/cgo. Change-Id: I214b18decdb83107cf7325b298609eef9f9d1330 Reviewed-on: https://go-review.googlesource.com/c/go/+/164010 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
Please register or sign in to comment