summaryrefslogtreecommitdiff
path: root/src/cmd/ld/lib.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2014-05-20 21:36:50 -0700
committerIan Lance Taylor <iant@golang.org>2014-05-20 21:36:50 -0700
commita0d21e150f9f579ef63423705e9d9ed79972f830 (patch)
tree6f3b04647e97ab47d279aae601faa6956335f9ae /src/cmd/ld/lib.c
parentd9a9b794a552da89699fbcc591064a35f5fcdeab (diff)
downloadgo-a0d21e150f9f579ef63423705e9d9ed79972f830.tar.gz
cmd/ld: really import runtime/cgo for external link
Fixes issue 8032. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/95580043
Diffstat (limited to 'src/cmd/ld/lib.c')
-rw-r--r--src/cmd/ld/lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c
index 2975b2327..da6194e4f 100644
--- a/src/cmd/ld/lib.c
+++ b/src/cmd/ld/lib.c
@@ -205,6 +205,8 @@ loadlib(void)
// whether to initialize the TLS. So give it one. This could
// be handled differently but it's an unusual case.
loadinternal("runtime/cgo");
+ if(i < ctxt->libraryp)
+ objfile(ctxt->library[i].file, ctxt->library[i].pkg);
// Pretend that we really imported the package.
s = linklookup(ctxt, "go.importpath.runtime/cgo.", 0);