summaryrefslogtreecommitdiff
path: root/src/cmd/ld/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/ld/lib.c')
-rw-r--r--src/cmd/ld/lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c
index 36f0f99de..3edf7253d 100644
--- a/src/cmd/ld/lib.c
+++ b/src/cmd/ld/lib.c
@@ -221,8 +221,10 @@ loadlib(void)
// Provided by the code that imports the package.
// Since we are simulating the import, we have to provide this string.
cgostrsym = "go.string.\"runtime/cgo\"";
- if(linkrlookup(ctxt, cgostrsym, 0) == nil)
+ if(linkrlookup(ctxt, cgostrsym, 0) == nil) {
addstrdata(cgostrsym, "runtime/cgo");
+ linklookup(ctxt, cgostrsym, 0)->type = SRODATA;
+ }
}
if(linkmode == LinkAuto) {