diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-04-28 14:05:20 +0000 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-04-28 14:15:26 +0000 |
commit | b85a03ccc20e446f89d7e32e98c71f5e66393b0c (patch) | |
tree | ff6a43cb86ee3641a7b54ae971a2acd72ac60fad /src/cmd/link/internal/ld/lib.go | |
parent | 8e7ddac52d436e6930b3d1f4b2106ee85e7adb30 (diff) | |
download | go-b85a03ccc20e446f89d7e32e98c71f5e66393b0c.tar.gz go-b85a03ccc20e446f89d7e32e98c71f5e66393b0c.zip |
Revert "[dev.link] cmd/link: stop overwriting symbol types in loadlibfull"
This reverts CL 229994.
Reason for revert: break AIX build.
This is nice to have but isn't critical. We can revisit later.
Change-Id: Ifc56a0a4c0fb36859cf7666ab149e25e0e5d4cc0
Reviewed-on: https://go-review.googlesource.com/c/go/+/230459
Run-TryBot: Cherry Zhang <cherryyz@google.com>
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, 15 insertions, 1 deletions
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index 96e3e8870c..a43aff22ee 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() { +func (ctxt *Link) loadlibfull(symGroupType []sym.SymKind) { // Load full symbol contents, resolve indexed references. ctxt.loader.LoadFull(ctxt.Arch, ctxt.Syms) @@ -2890,6 +2890,20 @@ func (ctxt *Link) loadlibfull() { } } + // 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. |