From 8756f605b8e890a155eb7bd4046c3f2330dde0d8 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 26 Sep 2014 13:50:53 -0400 Subject: liblink: fix cmd/ld -X flag This fixes the test/linkx.go test, which does not run by default. (Issue 4139 is about fixing that.) Fixes issue 8806. LGTM=r R=golang-codereviews, r CC=bradfitz, golang-codereviews, iant https://codereview.appspot.com/145420043 --- src/liblink/objfile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/liblink') diff --git a/src/liblink/objfile.c b/src/liblink/objfile.c index 15d602df9..b2478ec17 100644 --- a/src/liblink/objfile.c +++ b/src/liblink/objfile.c @@ -589,6 +589,8 @@ readsym(Link *ctxt, Biobuf *f, char *pkg, char *pn) typ = rdsym(ctxt, f, pkg); if(typ != nil) // if bss sym defined multiple times, take type from any one def s->gotype = typ; + if(dup != nil && typ != nil) + dup->gotype = typ; rddata(f, &s->p, &s->np); s->maxp = s->np; n = rdint(f); -- cgit v1.2.1