aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata
diff options
context:
space:
mode:
authorChristopher Nelson <nadiasvertex@gmail.com>2015-12-13 08:02:29 -0500
committerIan Lance Taylor <iant@golang.org>2016-04-04 03:38:25 +0000
commited8f0e5c33269de2f950d33ab7d50554b13f336e (patch)
tree082a9afa5121f0ca714f2b45ecbcac58db86de10 /src/runtime/testdata
parent386c0e6598eadab18e01d3fa60f8e21872cbe70c (diff)
downloadgo-ed8f0e5c33269de2f950d33ab7d50554b13f336e.tar.xz
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>
Diffstat (limited to 'src/runtime/testdata')
-rw-r--r--src/runtime/testdata/testprogcgo/threadpanic_windows.c3
1 files changed, 2 insertions, 1 deletions
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 <process.h>
#include <stdlib.h>
#include <stdio.h>
void gopanic(void);
-static void*
+static unsigned int
die(void* x)
{
gopanic();