cmd/internal/ld: put all type decoding in decodesym.go

Move the one instance of type structure decoding in the linker that
doesn't live decodesym.go in to decodesym.go.

Change-Id: Ic6a23500deb72f0e9c8227ab611511e9781fac70
Reviewed-on: https://go-review.googlesource.com/9690
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Austin Clements 2015-05-04 14:35:35 -04:00
parent 660a6825ea
commit 91938fd1ca
2 changed files with 5 additions and 4 deletions

View file

@ -1224,10 +1224,7 @@ func ldshlibsyms(shlib string) {
if decodetype_noptr(t) != 0 || decodetype_usegcprog(t) != 0 {
continue
}
// The expression on the next line is a copy of the expression from
// decodetype_gcmask in decodesym.go, which in turn depends on details of
// how the type data is laid out, as seen in gc/reflect.go:dcommontype.
addr := decode_inuxi(t.P[1*int32(Thearch.Ptrsize)+8+1*int32(Thearch.Ptrsize):], Thearch.Ptrsize)
addr := decodetype_gcprog_shlib(t)
tgcmask, ok := gcmasks[addr]
if !ok {
Diag("bits not found for %s at %d", t.Name, addr)