]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix -buildmode=c-archive should work on windows
authorChristopher Nelson <nadiasvertex@gmail.com>
Sun, 13 Dec 2015 13:02:29 +0000 (08:02 -0500)
committerIan Lance Taylor <iant@golang.org>
Mon, 4 Apr 2016 03:38:25 +0000 (03:38 +0000)
commited8f0e5c33269de2f950d33ab7d50554b13f336e
tree082a9afa5121f0ca714f2b45ecbcac58db86de10
parent386c0e6598eadab18e01d3fa60f8e21872cbe70c
cmd/go: fix -buildmode=c-archive should work on windows

Add supporting code for runtime initialization, including both
32- and 64-bit x86 architectures.

Add .ctors section on Windows to PE .o files, and INITENTRY to .ctors
section to plug in to the GCC C/C++ startup initialization mechanism.
This allows the Go runtime to initialize itself. Add .text section
symbol for .ctor relocations. Note: This is unlikely to be useful for
MSVC-based toolchains.

Fixes #13494

Change-Id: I4286a96f70e5f5228acae88eef46e2bed95813f3
Reviewed-on: https://go-review.googlesource.com/18057
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
misc/cgo/testcarchive/carchive_test.go
src/cmd/dist/test.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/pe.go
src/runtime/cgo/gcc_libinit_windows.c
src/runtime/os1_windows.go
src/runtime/rt0_windows_386.s
src/runtime/rt0_windows_amd64.s
src/runtime/testdata/testprogcgo/threadpanic_windows.c