From a0d21e150f9f579ef63423705e9d9ed79972f830 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 20 May 2014 21:36:50 -0700 Subject: cmd/ld: really import runtime/cgo for external link Fixes issue 8032. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/95580043 --- src/cmd/ld/lib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cmd/ld/lib.c') 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); -- cgit v1.2.1