cgo: handle references to symbols in shared libraries
Fixes #1334.
R=r
CC=golang-dev
https://golang.org/cl/3746041
diff --git a/misc/cgo/stdio/file.go b/misc/cgo/stdio/file.go
index 1f461f2..021cbf9 100644
--- a/misc/cgo/stdio/file.go
+++ b/misc/cgo/stdio/file.go
@@ -26,6 +26,10 @@
var Stdout = (*File)(C.stdout)
var Stderr = (*File)(C.stderr)
+// Test reference to library symbol.
+// Stdout and stderr are too special to be a reliable test.
+var myerr = C.sys_errlist
+
func (f *File) WriteString(s string) {
p := C.CString(s)
C.fputs(p, (*C.FILE)(f))