]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: expand set of symbol attributes in loader
authorThan McIntosh <thanm@google.com>
Wed, 11 Dec 2019 19:05:14 +0000 (14:05 -0500)
committerThan McIntosh <thanm@google.com>
Wed, 18 Dec 2019 14:24:26 +0000 (14:24 +0000)
commitb658c62e9c5861f8c2bcc6323572998ef5ee0567
treea019db6b3e84d6bb9ccb910ef47af8f52841e864
parent07914eda407a6197dc628fb20cf7d9b57b943518
[dev.link] cmd/link: expand set of symbol attributes in loader

Add in a collection of new loader interfaces for getting/setting
symbol attributes, e.g. properties that would normally be part of the
sym.Symbol "Attr" field. This change also moves references to the
loaders 'reachable' bitmap behind a pair of loader methods, so that we
a consistent way of accessing symbol attributes overall. It is worth
noting that not every symbol attribute is backed by a bitmap; for some
infrequently used attributes, a map[Sym]struct{} is used instead.

Change-Id: I0010c9cd928d41b4bb6cdf45db4581e11c3c5db3
Reviewed-on: https://go-review.googlesource.com/c/go/+/210778
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/ld/deadcode2.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/loader_test.go