diff options
author | Russ Cox <rsc@golang.org> | 2013-12-19 16:52:47 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2013-12-19 16:52:47 -0500 |
commit | 5b7bb718908d811f601f969d6ff3f095d4bca9ae (patch) | |
tree | d4dfb2545e587cd63181156cd8a2d5d3cd8d6147 | |
parent | 36bb902a6f8b2484d6bb0856ac9057b00966d70d (diff) | |
download | go-5b7bb718908d811f601f969d6ff3f095d4bca9ae.tar.gz |
liblink: allow either of a pair of conflicting symbols to say dupok
This makes the linker's -X flag work again.
R=iant
CC=bradfitz, golang-codereviews, golang-dev
https://codereview.appspot.com/44360043
-rw-r--r-- | src/liblink/objfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblink/objfile.c b/src/liblink/objfile.c index 94a256106..52ec90d68 100644 --- a/src/liblink/objfile.c +++ b/src/liblink/objfile.c @@ -503,7 +503,7 @@ readsym(Link *ctxt, Biobuf *f, char *pkg, char *pn) v = ctxt->version; s = linklookup(ctxt, name, v); if(s->type != 0 && s->type != SXREF) { - if(s->type != SBSS && s->type != SNOPTRBSS && (!dupok || !s->dupok)) + if(s->type != SBSS && s->type != SNOPTRBSS && !dupok && !s->dupok) sysfatal("duplicate symbol %s (types %d and %d) in %s and %s", s->name, s->type, t, s->file, pn); if(s->np > 0) s = linklookup(ctxt, ".dup", ndup++); // scratch |