From 60f783d92bc07fa7ca78e8efccbbc841d9f9cbcb Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 7 Mar 2013 09:19:02 -0500 Subject: 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 --- src/cmd/ld/ldelf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/ld/ldelf.c') diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c index 2bbf4f83e3..750dff4e60 100644 --- a/src/cmd/ld/ldelf.c +++ b/src/cmd/ld/ldelf.c @@ -595,7 +595,7 @@ ldelf(Biobuf *f, char *pkg, int64 len, char *pn) s->sub = sect->sym->sub; sect->sym->sub = s; s->type = sect->sym->type | (s->type&~SMASK) | SSUB; - if(!s->dynexport) { + if(!(s->cgoexport & CgoExportDynamic)) { s->dynimplib = nil; // satisfy dynimport s->dynimpname = nil; // satisfy dynimport } -- cgit v1.3-5-g9baa