aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ld/lib.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/cmd/ld/lib.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/cmd/ld/lib.c')
-rw-r--r--src/cmd/ld/lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c
index d49e6bcf8f..bfbdcd145b 100644
--- a/src/cmd/ld/lib.c
+++ b/src/cmd/ld/lib.c
@@ -1358,11 +1358,11 @@ genasmsym(void (*put)(LSym*, char*, int, vlong, vlong, int, LSym*))
for(a=s->autom; a; a=a->link) {
// Emit a or p according to actual offset, even if label is wrong.
// This avoids negative offsets, which cannot be encoded.
- if(a->type != D_AUTO && a->type != D_PARAM)
+ if(a->type != A_AUTO && a->type != A_PARAM)
continue;
// compute offset relative to FP
- if(a->type == D_PARAM)
+ if(a->type == A_PARAM)
off = a->aoffset;
else
off = a->aoffset - PtrSize;