Skip to content

Commit 735e5a4

Browse files
committed
cmd/compile: stop aligning string data
Makes godoc 10KB smaller. For #6853. Change-Id: Id54bd8c82cb2a1ba11d2d724e3107f73024b19d9 Reviewed-on: https://go-review.googlesource.com/19696 Run-TryBot: David Crawshaw <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent cd41db3 commit 735e5a4

File tree

1 file changed

+1
-2
lines changed
  • src/cmd/compile/internal/gc

1 file changed

+1
-2
lines changed

src/cmd/compile/internal/gc/obj.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ func stringsym(s string) (hdr, data *Sym) {
233233
off = dsname(symdata, off, s[n:n+m])
234234
}
235235

236-
off = duint8(symdata, off, 0) // terminating NUL for runtime
237-
off = (off + Widthptr - 1) &^ (Widthptr - 1) // round to pointer alignment
236+
off = duint8(symdata, off, 0) // terminating NUL for runtime
238237
ggloblsym(symdata, int32(off), obj.DUPOK|obj.RODATA|obj.LOCAL)
239238

240239
return symhdr, symdata

0 commit comments

Comments
 (0)