summaryrefslogtreecommitdiff
path: root/src/cmd/ld
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2014-10-21 10:10:11 -0700
committerIan Lance Taylor <iant@golang.org>2014-10-21 10:10:11 -0700
commit3264e89a0da69d919af86273e9a9a12e45b125e0 (patch)
tree50b243d8b106cd451bb3cde08de950b406e789c1 /src/cmd/ld
parent67a569fc4cdae5efbddc5ebe5365fc7457ee38a5 (diff)
downloadgo-3264e89a0da69d919af86273e9a9a12e45b125e0.tar.gz
cmd/ld: fix addstrdata for big-endian systems
LGTM=rsc R=minux, rsc CC=golang-codereviews https://codereview.appspot.com/158280043
Diffstat (limited to 'src/cmd/ld')
-rw-r--r--src/cmd/ld/data.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cmd/ld/data.c b/src/cmd/ld/data.c
index 9983a9281..61847546a 100644
--- a/src/cmd/ld/data.c
+++ b/src/cmd/ld/data.c
@@ -633,9 +633,7 @@ addstrdata(char *name, char *value)
s->dupok = 1;
reachable = s->reachable;
addaddr(ctxt, s, sp);
- adduint32(ctxt, s, strlen(value));
- if(PtrSize == 8)
- adduint32(ctxt, s, 0); // round struct to pointer width
+ adduintxx(ctxt, s, strlen(value), PtrSize);
// addstring, addaddr, etc., mark the symbols as reachable.
// In this case that is not necessarily true, so stick to what