]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/ld: do not depend on local symbols to read a type's gcdata
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Mon, 25 May 2015 04:13:50 +0000 (16:13 +1200)
committerIan Lance Taylor <iant@golang.org>
Wed, 27 May 2015 14:11:16 +0000 (14:11 +0000)
commitc949cff6a755aacd7407a803d304f1aba057bf5c
treea0858692b118e3292d54e849ccfbfd7012355ca0
parentbcc1870fcfaf121ed69096c21a9d82f69a8e6a18
cmd/internal/ld: do not depend on local symbols to read a type's gcdata

We already read the address of a gcmask/gcprog out of the type data, but I
didn't know how many bytes to read. But it turns out that it's easy to
calculate, so change to do that. This means that we no longer depend on the
local symbols being present, allowing me to strip the shared libraries for
distribution and make them a lot smaller.

As a bonus, this makes LSym another 24 bytes smaller, down to 296 bytes now.

Change-Id: I379d359e28d63afae6753efd23efdf1fbb716992
Reviewed-on: https://go-review.googlesource.com/10377
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
misc/cgo/testshared/src/dep/dep.go
misc/cgo/testshared/src/dep2/dep2.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/decodesym.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/link.go