summaryrefslogtreecommitdiff
path: root/src/cmd/ld/lib.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-24 14:45:11 -0700
committerRuss Cox <rsc@golang.org>2014-09-24 14:45:11 -0700
commita7a96c8cd6ef6146bf57eb419c0744c4ca8fc1e2 (patch)
treefee37a3123b04c6f754d8e0f3d31df3ecd8c49c4 /src/cmd/ld/lib.c
parent4a911080c68b525a246df154f4f963f1b026eff3 (diff)
downloadgo-a7a96c8cd6ef6146bf57eb419c0744c4ca8fc1e2.tar.gz
build: fix elf builds
Corrections due to new strict type rules for data+bss. Also disable misc/cgo/cdefstest since you can't compile C code anymore. TBR=iant CC=golang-codereviews https://codereview.appspot.com/148050044
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) {