Commit 433e47dc authored by Russ Cox's avatar Russ Cox

ld: only set SNOPTRBSS during load

dodata will convert to SNOPTRDATA if appropriate.
Should fix arm build (hope springs eternal).

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5687074
parent 8d29a097
...@@ -551,12 +551,8 @@ loop: ...@@ -551,12 +551,8 @@ loop:
s->dupok = 1; s->dupok = 1;
if(p->reg & RODATA) if(p->reg & RODATA)
s->type = SRODATA; s->type = SRODATA;
else if(p->reg & NOPTR) { else if(p->reg & NOPTR)
if(s->np > 0) s->type = SNOPTRBSS;
s->type = SNOPTRDATA;
else
s->type = SNOPTRBSS;
}
break; break;
case ADATA: case ADATA:
......
...@@ -567,12 +567,8 @@ loop: ...@@ -567,12 +567,8 @@ loop:
s->dupok = 1; s->dupok = 1;
if(p->from.scale & RODATA) if(p->from.scale & RODATA)
s->type = SRODATA; s->type = SRODATA;
else if(p->from.scale & NOPTR) { else if(p->from.scale & NOPTR)
if(s->np > 0) s->type = SNOPTRBSS;
s->type = SNOPTRDATA;
else
s->type = SNOPTRBSS;
}
goto loop; goto loop;
case ADATA: case ADATA:
......
...@@ -563,7 +563,7 @@ loop: ...@@ -563,7 +563,7 @@ loop:
s->type = SBSS; s->type = SBSS;
s->size = 0; s->size = 0;
} }
if(s->type != SBSS && s->type != SNOPTRDATA && !s->dupok) { if(s->type != SBSS && s->type != SNOPTRBSS && !s->dupok) {
diag("%s: redefinition: %s in %s", diag("%s: redefinition: %s in %s",
pn, s->name, TNAME); pn, s->name, TNAME);
s->type = SBSS; s->type = SBSS;
...@@ -576,7 +576,7 @@ loop: ...@@ -576,7 +576,7 @@ loop:
if(p->from.scale & RODATA) if(p->from.scale & RODATA)
s->type = SRODATA; s->type = SRODATA;
else if(p->from.scale & NOPTR) else if(p->from.scale & NOPTR)
s->type = SNOPTRDATA; s->type = SNOPTRBSS;
goto loop; goto loop;
case ADATA: case ADATA:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment