]> Cypherpunks repositories - gostls13.git/commit
runtime: create library startup for aix/ppc64
authorClément Chigot <clement.chigot@atos.net>
Mon, 25 Mar 2019 09:31:30 +0000 (10:31 +0100)
committerIan Lance Taylor <iant@golang.org>
Wed, 27 Mar 2019 17:22:11 +0000 (17:22 +0000)
commit38dc177d3ac5b5a8cb6b7f9039144cbe8bd58036
treee5fad95d9ef8d6a87ee631ac49a2ff7529a10fad
parent53c9c068115168ebcc1e649fa7a15a804a99d92f
runtime: create library startup for aix/ppc64

As .init_array section aren't available on AIX, the Go runtime
initialization is made with gcc constructor attribute.
However, as cgo tool is building a binary in order to get imported
C symbols, Go symbols imported for this initilization must be ignored.
-Wl,-berok is mandatory otherwize ld will fail to create this binary,
_rt0_aix_ppc64_lib and runtime_rt0_go aren't defined in runtime/cgo.
These two symbols must also be ignored when creating _cgo_import.go.

Change-Id: Icf2e0282f5b50de5fa82007439a428e6147efef1
Reviewed-on: https://go-review.googlesource.com/c/go/+/169118
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/cgo/out.go
src/cmd/go/internal/work/security.go
src/runtime/cgo/callbacks_aix.go
src/runtime/cgo/cgo.go
src/runtime/cgo/gcc_aix_ppc64.c
src/runtime/os2_aix.go
src/runtime/os_aix.go
src/runtime/rt0_aix_ppc64.s
src/runtime/symtab.go
src/runtime/sys_aix_ppc64.s