Commit f29bd6c4 authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/ld: fix addstrdata for big-endian systems

LGTM=rsc
R=minux, rsc
CC=golang-codereviews
https://golang.org/cl/158280043
parent ab4af52a
...@@ -633,9 +633,7 @@ addstrdata(char *name, char *value) ...@@ -633,9 +633,7 @@ addstrdata(char *name, char *value)
s->dupok = 1; s->dupok = 1;
reachable = s->reachable; reachable = s->reachable;
addaddr(ctxt, s, sp); addaddr(ctxt, s, sp);
adduint32(ctxt, s, strlen(value)); adduintxx(ctxt, s, strlen(value), PtrSize);
if(PtrSize == 8)
adduint32(ctxt, s, 0); // round struct to pointer width
// addstring, addaddr, etc., mark the symbols as reachable. // addstring, addaddr, etc., mark the symbols as reachable.
// In this case that is not necessarily true, so stick to what // In this case that is not necessarily true, so stick to what
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment