]> Cypherpunks repositories - gostls13.git/commit
cmd/link, cmd/compile: typelink sorting in linker
authorDavid Crawshaw <crawshaw@golang.org>
Mon, 4 Apr 2016 17:07:24 +0000 (13:07 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Mon, 18 Apr 2016 19:20:37 +0000 (19:20 +0000)
commit4140da7b57f944cc16324496adcc5a41d7a987ed
tree081ca414b90581403a7886c2a8602bfebe69928e
parent2e2df78ae9c2c5e96cce99bccebd5a22f30d6a1a
cmd/link, cmd/compile: typelink sorting in linker

Instead of writing out the type almost twice in the symbol name,
teach the linker how to sort typelink symbols by their contents.

This ~halves the size of typelink symbol names, which helps very
large (6KB) names like those mentioned in #15104.

This does not increase the total sorting work done by the linker,
and makes it possible to use shorter symbol names for types. See
the follow-on CL 21583.

Change-Id: Ie5807565ed07d31bc477d20f60e4c0b47144f337
Reviewed-on: https://go-review.googlesource.com/21457
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/reflect.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/decodesym.go