1
0
mirror of https://github.com/golang/go synced 2024-11-12 02:20:23 -07:00

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
This commit is contained in:
Russ Cox 2012-02-21 23:04:38 -05:00
parent 8d29a09707
commit 433e47dc03
3 changed files with 6 additions and 14 deletions

View File

@ -551,12 +551,8 @@ loop:
s->dupok = 1;
if(p->reg & RODATA)
s->type = SRODATA;
else if(p->reg & NOPTR) {
if(s->np > 0)
s->type = SNOPTRDATA;
else
s->type = SNOPTRBSS;
}
else if(p->reg & NOPTR)
s->type = SNOPTRBSS;
break;
case ADATA:

View File

@ -567,12 +567,8 @@ loop:
s->dupok = 1;
if(p->from.scale & RODATA)
s->type = SRODATA;
else if(p->from.scale & NOPTR) {
if(s->np > 0)
s->type = SNOPTRDATA;
else
s->type = SNOPTRBSS;
}
else if(p->from.scale & NOPTR)
s->type = SNOPTRBSS;
goto loop;
case ADATA:

View File

@ -563,7 +563,7 @@ loop:
s->type = SBSS;
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",
pn, s->name, TNAME);
s->type = SBSS;
@ -576,7 +576,7 @@ loop:
if(p->from.scale & RODATA)
s->type = SRODATA;
else if(p->from.scale & NOPTR)
s->type = SNOPTRDATA;
s->type = SNOPTRBSS;
goto loop;
case ADATA: