]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/gc, cmd/internal/ld: fixes for global vars of types from other modules
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Wed, 1 Apr 2015 03:20:44 +0000 (16:20 +1300)
committerIan Lance Taylor <iant@golang.org>
Wed, 22 Apr 2015 19:07:34 +0000 (19:07 +0000)
commit7820d270498d6d4d960f7e34a0a80cafe2d05117
tree4618e5adee40faafaf471fd47e1db56ca20f44be
parentac1cdd13e04607abb862d508312c64180ad142da
cmd/internal/gc, cmd/internal/ld: fixes for global vars of types from other modules

To make the gcprog for global data containing variables of types defined in other shared
libraries, we need to know a lot about those types. So read the value of any symbol with
a name starting with "type.". If a type uses a mask, the name of the symbol defining the
mask unfortunately cannot be predicted from the type name so I have to keep track of the
addresses of every such symbol and associate them with the type symbols after the fact.

I'm not very happy about this change, but something like this is needed and this is as
pleasant as I know how to make it.

Change-Id: I408d831b08b3b31e0610688c41367b23998e975c
Reviewed-on: https://go-review.googlesource.com/8334
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
src/cmd/internal/ld/decodesym.go
src/cmd/internal/ld/lib.go
src/cmd/internal/ld/link.go
src/cmd/internal/ld/objfile.go