]> Cypherpunks repositories - gostls13.git/commit
cmd/link: shorter type symbol names
authorDavid Crawshaw <crawshaw@golang.org>
Wed, 6 Apr 2016 17:09:06 +0000 (13:09 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Mon, 18 Apr 2016 20:32:57 +0000 (20:32 +0000)
commitf81ae3b22ca9cab78251b38fe52eacfea57e08f5
tree8fb2db323aa7423984d9cfab8f17948fd4aa4a12
parent4d5adf1eb1a955bae08012e568c645eb4d7f3544
cmd/link: shorter type symbol names

Use (part of) a SHA-1 checksum to replace type symbol names.

In typical programs this has no effect because types are not included
in the symbol table. But when dynamically linking, types are in the
table to make sure there is only one *rtype per Go type.

Eventually we may be able to get rid of all pointers to rtype values in
the binary, but probably not by 1.7. And this has a nice effect on
binary size today:

libstd.so:
before 27.4MB
after  26.2MB

For #6853.

Change-Id: I603d7f3e5baad84f59f2fd37eeb1e4ae5acfe44a
Reviewed-on: https://go-review.googlesource.com/21583
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/link/internal/ld/objfile.go