diff --git a/sys/src/cmd/7l/asm.c b/sys/src/cmd/7l/asm.c index 0cc5a27ec..0b3b444fa 100644 --- a/sys/src/cmd/7l/asm.c +++ b/sys/src/cmd/7l/asm.c @@ -493,7 +493,7 @@ datblk(long s, long n, int str) } if(l >= n) continue; - if(p->as != AINIT && p->as != ADYNT) { + if(p->as != AINIT && p->as != ADYNT && !p->from.sym->dupok) { for(j=l+(c-i)-1; j>=l; j--) if(buf.dbuf[j]) { print("%P\n", p); diff --git a/sys/src/cmd/7l/l.h b/sys/src/cmd/7l/l.h index 55ff29b8d..8d13a7914 100644 --- a/sys/src/cmd/7l/l.h +++ b/sys/src/cmd/7l/l.h @@ -81,6 +81,7 @@ struct Sym short version; short become; short frame; + char dupok; uchar subtype; ushort file; vlong value; diff --git a/sys/src/cmd/7l/obj.c b/sys/src/cmd/7l/obj.c index fc709843d..081e7ed0b 100644 --- a/sys/src/cmd/7l/obj.c +++ b/sys/src/cmd/7l/obj.c @@ -839,6 +839,8 @@ loop: diag("GLOBL must have a name\n%P", p); errorexit(); } + if(p->reg & DUPOK) + s->dupok = 1; if(s->type == 0 || s->type == SXREF) { s->type = SBSS; s->value = 0; @@ -1122,7 +1124,7 @@ lookup(char *symb, int v) s->version = v; s->value = 0; s->sig = 0; -// s->dupok = 0; + s->dupok = 0; hash[h] = s; return s; }