cmd/link: collect itablinks as a slice in moduledata

See #14874

This change tells the linker to collect all the itablink symbols and
collect them so that moduledata can have a slice of all compiler
generated itabs.

The logic is shamelessly adapted from what is done with typelink symbols.

Change-Id: Ie93b59acf0fcba908a876d506afbf796f222dbac
Reviewed-on: https://go-review.googlesource.com/20889
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Michel Lespinasse 2016-03-17 07:00:33 -07:00
parent f00bbd5f81
commit 79688ca58f
9 changed files with 52 additions and 5 deletions

View file

@ -1930,6 +1930,7 @@ func genasmsym(put func(*LSym, string, int, int64, int64, int, *LSym)) {
obj.SGCBITSRELRO,
obj.SRODATARELRO,
obj.STYPELINK,
obj.SITABLINK,
obj.SWINDOWS:
if !s.Attr.Reachable() {
continue