diff options
author | Than McIntosh <thanm@google.com> | 2020-04-28 15:25:54 -0400 |
---|---|---|
committer | Than McIntosh <thanm@google.com> | 2020-04-29 15:05:14 +0000 |
commit | 9a3bf7d542b73307f455d714d97cc28f78a9b0eb (patch) | |
tree | a5ec8657beda3d892150f7e05f1f7315ca404cad /src/cmd/link/internal/loader/loader.go | |
parent | 8493b645270bde36c5c76b5baf903fe0fb44f0d4 (diff) | |
download | go-9a3bf7d542b73307f455d714d97cc28f78a9b0eb.tar.gz go-9a3bf7d542b73307f455d714d97cc28f78a9b0eb.zip |
[dev.link] cmd/link: remove Sub field from sym.Symbol
Remove 'Sub' field from sym.Symbol, replacing uses (those downstream of
loadlibfull) with loader method calls.
NB: removing the Outer field will have to wait for now; it is accessed
in archreloc methods that don't have access to link ctxt or loader
currently.
Change-Id: I2abe5906fc169c64b2ab7d5ad213619bea5a17c7
Reviewed-on: https://go-review.googlesource.com/c/go/+/230617
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/link/internal/loader/loader.go')
-rw-r--r-- | src/cmd/link/internal/loader/loader.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go index 2abd0e60e1..4fcdc1a661 100644 --- a/src/cmd/link/internal/loader/loader.go +++ b/src/cmd/link/internal/loader/loader.go @@ -2544,13 +2544,10 @@ func (l *Loader) migrateAttributes(src Sym, dst *sym.Symbol) { dst.Attr.Set(sym.AttrCgoExportStatic, l.AttrCgoExportStatic(src)) dst.Attr.Set(sym.AttrReadOnly, l.AttrReadOnly(src)) - // Convert outer/sub relationships + // Convert outer relationship if outer, ok := l.outer[src]; ok { dst.Outer = l.Syms[outer] } - if sub, ok := l.sub[src]; ok { - dst.Sub = l.Syms[sub] - } // Set sub-symbol attribute. See the comment on the AttrSubSymbol // method for more on this, there is some tricky stuff here. |