diff options
| author | Russ Cox <rsc@golang.org> | 2013-03-07 09:19:02 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2013-03-07 09:19:02 -0500 |
| commit | 60f783d92bc07fa7ca78e8efccbbc841d9f9cbcb (patch) | |
| tree | 8677601561fbb007429777514911480aa4c871fd /src/cmd/ld/pe.c | |
| parent | 8aafb44b0bbba85535feb67e7ae0f4f254524c0f (diff) | |
| download | go-60f783d92bc07fa7ca78e8efccbbc841d9f9cbcb.tar.xz | |
cmd/ld: host linking support for linux/amd64
Still to do: non-linux and non-amd64.
It may work on other ELF-based amd64 systems too, but untested.
"go test -ldflags -hostobj $GOROOT/misc/cgo/test" passes.
Much may yet change, but this seems a reasonable checkpoint.
R=iant
CC=golang-dev
https://golang.org/cl/7369057
Diffstat (limited to 'src/cmd/ld/pe.c')
| -rw-r--r-- | src/cmd/ld/pe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/ld/pe.c b/src/cmd/ld/pe.c index f2903ba0f9..85f622dbc0 100644 --- a/src/cmd/ld/pe.c +++ b/src/cmd/ld/pe.c @@ -195,7 +195,7 @@ initdynimport(void) dr = nil; m = nil; for(s = allsym; s != S; s = s->allsym) { - if(!s->reachable || !s->dynimpname || s->dynexport) + if(!s->reachable || !s->dynimpname || (s->cgoexport & CgoExportDynamic)) continue; for(d = dr; d != nil; d = d->next) { if(strcmp(d->name,s->dynimplib) == 0) { @@ -335,7 +335,7 @@ initdynexport(void) nexport = 0; for(s = allsym; s != S; s = s->allsym) { - if(!s->reachable || !s->dynimpname || !s->dynexport) + if(!s->reachable || !s->dynimpname || !(s->cgoexport & CgoExportDynamic)) continue; if(nexport+1 > sizeof(dexport)/sizeof(dexport[0])) { diag("pe dynexport table is full"); |
