diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-04-25 17:27:34 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-04-27 21:18:16 +0000 |
commit | b6df7e555ec1e1f813cda0d250cd109533e6d4e5 (patch) | |
tree | 99b6002f02ac789978556d5581f0cabfa3f78c44 /src/cmd/link/internal/ld/lib.go | |
parent | 98e3fdab3eca022aa85eda84fb074d75a745b5cc (diff) | |
download | go-b6df7e555ec1e1f813cda0d250cd109533e6d4e5.tar.gz go-b6df7e555ec1e1f813cda0d250cd109533e6d4e5.zip |
[dev.link] cmd/link: stop overwriting symbol types in loadlibfull
symGroupType was needed for dodata. Now that we have converted
dodata to using the loader, stop overwriting it.
Change-Id: Ie94109c0b35dd2f71a19ebb38f8cf20b6a37c624
Reviewed-on: https://go-review.googlesource.com/c/go/+/229994
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/link/internal/ld/lib.go')
-rw-r--r-- | src/cmd/link/internal/ld/lib.go | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index a43aff22ee..96e3e8870c 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -2824,7 +2824,7 @@ func addToTextp(ctxt *Link) { ctxt.Textp = textp } -func (ctxt *Link) loadlibfull(symGroupType []sym.SymKind) { +func (ctxt *Link) loadlibfull() { // Load full symbol contents, resolve indexed references. ctxt.loader.LoadFull(ctxt.Arch, ctxt.Syms) @@ -2890,20 +2890,6 @@ func (ctxt *Link) loadlibfull(symGroupType []sym.SymKind) { } } - // For now, overwrite symbol type with its "group" type, as dodata - // expected. Once we converted dodata, this will probably not be - // needed. - for i, t := range symGroupType { - if t != sym.Sxxx { - s := ctxt.loader.Syms[i] - if s == nil { - panic(fmt.Sprintf("nil sym for symGroupType t=%s entry %d", t.String(), i)) - } - s.Type = t - } - } - symGroupType = nil - if ctxt.Debugvlog > 1 { // loadlibfull is likely a good place to dump. // Only dump under -v=2 and above. |