From: Ian Lance Taylor Date: Tue, 21 Oct 2014 17:10:11 +0000 (-0700) Subject: cmd/ld: fix addstrdata for big-endian systems X-Git-Tag: go1.4beta1~63 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f29bd6c4a4385cd9ad24b4a0da0b66dd4f6644aa;p=gostls13.git cmd/ld: fix addstrdata for big-endian systems LGTM=rsc R=minux, rsc CC=golang-codereviews https://golang.org/cl/158280043 --- diff --git a/src/cmd/ld/data.c b/src/cmd/ld/data.c index 9983a9281c..61847546a3 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