]> Cypherpunks repositories - gostls13.git/commit
cmd/link: split off 'Dynimp' string fields to reduce sym.Symbol size
authorThan McIntosh <thanm@google.com>
Thu, 28 Jun 2018 20:10:19 +0000 (16:10 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 3 Jul 2018 14:48:40 +0000 (14:48 +0000)
commitf00bfb385ba7f9148a3f3af6c4882a3e53c3b536
tree529fa10404e9af518ee7314f31b888d55d75edcf
parent32bc0976f9c4333e4a9247d6acc908972c6c5d79
cmd/link: split off 'Dynimp' string fields to reduce sym.Symbol size

The linker's sym.Symbol struct contains two string fields, "Dynimplib"
and "Dynimpvers" that are used only in very specific circumstances
(for many symbols, such as DWARF syms, they are wasted space). Split
these two off into a separate struct, then point to an instance of
that struct when needed. This reduces the size of sym.Symbol so as to
save space in the common case.

Updates #26186

Change-Id: Id9c74824e78423a215c8cbc105b72665525a1eff
Reviewed-on: https://go-review.googlesource.com/121916
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/go.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/pe.go
src/cmd/link/internal/loadelf/ldelf.go
src/cmd/link/internal/loadmacho/ldmacho.go
src/cmd/link/internal/sym/symbol.go