mirror of
https://github.com/golang/go
synced 2024-11-19 07:14:45 -07:00
liblink: use LinkArch.textflag() to get text and dataflag
Rather than switch on thechar. LGTM=rsc, dave R=rsc, iant, dave CC=golang-codereviews https://golang.org/cl/119330043
This commit is contained in:
parent
61b1d3a719
commit
3c24b60fd3
@ -183,12 +183,7 @@ writeobj(Link *ctxt, Biobuf *b)
|
|||||||
s->size = p->to.offset;
|
s->size = p->to.offset;
|
||||||
if(s->type == 0 || s->type == SXREF)
|
if(s->type == 0 || s->type == SXREF)
|
||||||
s->type = SBSS;
|
s->type = SBSS;
|
||||||
|
flag = ctxt->arch->textflag(p);
|
||||||
if(ctxt->arch->thechar == '5')
|
|
||||||
flag = p->reg;
|
|
||||||
else
|
|
||||||
flag = p->from.scale;
|
|
||||||
|
|
||||||
if(flag & DUPOK)
|
if(flag & DUPOK)
|
||||||
s->dupok = 1;
|
s->dupok = 1;
|
||||||
if(flag & RODATA)
|
if(flag & RODATA)
|
||||||
@ -221,10 +216,7 @@ writeobj(Link *ctxt, Biobuf *b)
|
|||||||
else
|
else
|
||||||
etext->next = s;
|
etext->next = s;
|
||||||
etext = s;
|
etext = s;
|
||||||
if(ctxt->arch->thechar == '5')
|
flag = ctxt->arch->textflag(p);
|
||||||
flag = p->reg;
|
|
||||||
else
|
|
||||||
flag = p->from.scale;
|
|
||||||
if(flag & DUPOK)
|
if(flag & DUPOK)
|
||||||
s->dupok = 1;
|
s->dupok = 1;
|
||||||
if(flag & NOSPLIT)
|
if(flag & NOSPLIT)
|
||||||
|
Loading…
Reference in New Issue
Block a user