From ed8f0e5c33269de2f950d33ab7d50554b13f336e Mon Sep 17 00:00:00 2001 From: Christopher Nelson Date: Sun, 13 Dec 2015 08:02:29 -0500 Subject: 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 Run-TryBot: Ian Lance Taylor --- src/runtime/testdata/testprogcgo/threadpanic_windows.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/runtime/testdata') diff --git a/src/runtime/testdata/testprogcgo/threadpanic_windows.c b/src/runtime/testdata/testprogcgo/threadpanic_windows.c index cf960db53a..6f896634a6 100644 --- a/src/runtime/testdata/testprogcgo/threadpanic_windows.c +++ b/src/runtime/testdata/testprogcgo/threadpanic_windows.c @@ -2,12 +2,13 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +#include #include #include void gopanic(void); -static void* +static unsigned int die(void* x) { gopanic(); -- cgit v1.3-5-g9baa