|
|
|
cmd/cgo: allow for stdcall decorated dynimport names
To allow for stdcall decorated names on Windows, two changes were needed:
1. Change the symbol versioning delimiter '@' in cgo's dynimport output to a '#', and in cmd/ld when it parses dynimports.
2. Remove the "@N" decorator from the first argument of cgo's dynimport output (PE only).
Fixes issue 4607.
Patch Set 1 #Patch Set 2 : diff -r 21096a13f14b https://code.google.com/p/go #
Total comments: 2
Patch Set 3 : diff -r d0d76b7fb219 https://code.google.com/p/go #Patch Set 4 : diff -r d0d76b7fb219 https://code.google.com/p/go #Patch Set 5 : diff -r 49db9317937c https://code.google.com/p/go #Total messages: 9
|
minux1
https://codereview.appspot.com/7047043/diff/2001/src/cmd/cgo/out.go File src/cmd/cgo/out.go (right): https://codereview.appspot.com/7047043/diff/2001/src/cmd/cgo/out.go#newcode221 src/cmd/cgo/out.go:221: name = name[:i] please consider using strings.Split(name, "@") then ...
|
13 years ago (2013年01月03日 10:49:43 UTC) #1 |
https://codereview.appspot.com/7047043/diff/2001/src/cmd/cgo/out.go File src/cmd/cgo/out.go (right): https://codereview.appspot.com/7047043/diff/2001/src/cmd/cgo/out.go#newcode221 src/cmd/cgo/out.go:221: name = name[:i] please consider using strings.Split(name, "@") then you don't need to do any conditionals here.
Hello minux.ma@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
On 2013年01月03日 20:52:24, james4k wrote: > Hello mailto:minux.ma@gmail.com (cc: mailto:golang-dev@googlegroups.com), > > I'd like you to review this change to > https://code.google.com/p/go Hmm, I just uploaded a fix for an issue I didn't see at first (should split ss[0], not s), but the side-by-side diff view doesn't seem to work anymore.
Try hg sync hg upload 7047043
On 2013年01月06日 21:41:43, adg wrote: > Try > > hg sync > hg upload 7047043 Thanks adg, that worked.
PTAL. Do you think perhaps some sort of test would be necessary? Is there an existing test for ELF symbol versioning with cgo? https://codereview.appspot.com/7047043/diff/2001/src/cmd/cgo/out.go File src/cmd/cgo/out.go (right): https://codereview.appspot.com/7047043/diff/2001/src/cmd/cgo/out.go#newcode221 src/cmd/cgo/out.go:221: name = name[:i] On 2013年01月03日 10:49:43, minux wrote: > please consider using strings.Split(name, "@") > then you don't need to do any conditionals here. Done.
sorry for the long delay. please add a windows-only test to call stdcall decorated symbol to misc/cgo/test.
LGTM
*** Submitted as https://code.google.com/p/go/source/detail?r=d8e64f78ab02 *** cmd/cgo: allow for stdcall decorated dynimport names To allow for stdcall decorated names on Windows, two changes were needed: 1. Change the symbol versioning delimiter '@' in cgo's dynimport output to a '#', and in cmd/ld when it parses dynimports. 2. Remove the "@N" decorator from the first argument of cgo's dynimport output (PE only). Fixes issue 4607. R=minux.ma, adg, rsc CC=golang-dev https://codereview.appspot.com/7047043 Committer: Russ Cox <rsc@golang.org>