]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: stop aligning string data
authorDavid Crawshaw <crawshaw@golang.org>
Thu, 18 Feb 2016 16:02:39 +0000 (11:02 -0500)
committerDavid Crawshaw <crawshaw@golang.org>
Tue, 23 Feb 2016 17:15:39 +0000 (17:15 +0000)
Makes godoc 10KB smaller.
For #6853.

Change-Id: Id54bd8c82cb2a1ba11d2d724e3107f73024b19d9
Reviewed-on: https://go-review.googlesource.com/19696
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/obj.go

index 66549be5c42de64033840928debb034a8d7aee11..0a96da61fa4de721e6f7199b2094f4acb455da2b 100644 (file)
@@ -233,8 +233,7 @@ func stringsym(s string) (hdr, data *Sym) {
                off = dsname(symdata, off, s[n:n+m])
        }
 
-       off = duint8(symdata, off, 0)                // terminating NUL for runtime
-       off = (off + Widthptr - 1) &^ (Widthptr - 1) // round to pointer alignment
+       off = duint8(symdata, off, 0) // terminating NUL for runtime
        ggloblsym(symdata, int32(off), obj.DUPOK|obj.RODATA|obj.LOCAL)
 
        return symhdr, symdata