commit | 6112e6e404755028b2995bde31ca6e4a6bfe14a8 | [log] [tgz] |
---|---|---|
author | Shenghou Ma <minux@golang.org> | Sun Mar 08 23:04:48 2015 -0400 |
committer | Minux Ma <minux@golang.org> | Tue Mar 24 03:22:26 2015 +0000 |
tree | b73cdec274c00c297e9862c65c007aa3d8ce152d | |
parent | 398f56fe22dff8463c7833088d05d6c3968a3051 [diff] |
cmd/internal/ld, runtime: record argument size for cgo_dynimport stdcall syscalls When external linking, we must link to implib provided by mingw, so we must use properly decorated names for stdcalls. Because the feature is only used in the runtime, I've designed a new decoration scheme so that we can use the same decorated name for both 386 and amd64. A stdcall function named FooEx from bar16.dll which takes 3 parameters will be imported like this: //go:cgo_import_dynamic runtime._FooEx FooEx%3 "bar16.dll" Depending on the size of uintptr, the linker will later transform it to _FooEx@12 or _FooEx@24. This is in prepration for the next CL that adds external linking support for windows/386. Change-Id: I2d2ea233f976aab3f356f9b508cdd246d5013e2c Signed-off-by: Shenghou Ma <minux@golang.org> Reviewed-on: https://go-review.googlesource.com/7163 Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.