aboutsummaryrefslogtreecommitdiff
path: root/src/liblink/asm8.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-04-14 15:54:20 -0400
committerRuss Cox <rsc@golang.org>2014-04-14 15:54:20 -0400
commit8d39e55c6516be5ee3267b8ce101b324a4f09986 (patch)
treeacc342d354cf6456d4cf9b60afea3fc0a0547979 /src/liblink/asm8.c
parentb53bb2cae512ce4abbc1587a903171a9da6201cf (diff)
downloadgo-8d39e55c6516be5ee3267b8ce101b324a4f09986.tar.xz
liblink: remove arch-specific constants from file format
The relocation and automatic variable types were using arch-specific numbers. Introduce portable enumerations instead. To the best of my knowledge, these are the only arch-specific bits left in the new object file format. Remove now, before Go 1.3, because file formats are forever. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/87670044
Diffstat (limited to 'src/liblink/asm8.c')
-rw-r--r--src/liblink/asm8.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/liblink/asm8.c b/src/liblink/asm8.c
index 4d209cbdfa..2bf6707e1e 100644
--- a/src/liblink/asm8.c
+++ b/src/liblink/asm8.c
@@ -1717,7 +1717,7 @@ vaddr(Link *ctxt, Addr *a, Reloc *r)
ctxt->diag("need reloc for %D", a);
sysfatal("bad code");
}
- r->type = D_ADDR;
+ r->type = R_ADDR;
r->siz = 4;
r->off = -1;
r->sym = s;
@@ -2360,7 +2360,7 @@ found:
*ctxt->andptr++ = op;
r = addrel(ctxt->cursym);
r->off = p->pc + ctxt->andptr - ctxt->and;
- r->type = D_PCREL;
+ r->type = R_PCREL;
r->siz = 4;
r->sym = p->to.sym;
r->add = p->to.offset;
@@ -2379,7 +2379,7 @@ found:
r = addrel(ctxt->cursym);
r->off = p->pc + ctxt->andptr - ctxt->and;
r->sym = p->to.sym;
- r->type = D_PCREL;
+ r->type = R_PCREL;
r->siz = 4;
put4(ctxt, 0);
break;
@@ -2445,7 +2445,7 @@ found:
*ctxt->andptr++ = o->op[z+1];
r = addrel(ctxt->cursym);
r->off = p->pc + ctxt->andptr - ctxt->and;
- r->type = D_PCREL;
+ r->type = R_PCREL;
r->siz = 4;
r->add = p->to.offset;
put4(ctxt, 0);
@@ -2456,7 +2456,7 @@ found:
*ctxt->andptr++ = o->op[z+1];
r = addrel(ctxt->cursym);
r->off = p->pc + ctxt->andptr - ctxt->and;
- r->type = D_ADDR;
+ r->type = R_ADDR;
r->siz = 4;
r->add = p->to.offset;
r->sym = p->to.sym;