mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: move ElfType field in sym.Symbol to cold section
The sym.Symbol 'ElfType' field is used only for symbols corresponding to things in imported shared libraries, hence is not needed in the common case. Relocate it to sym.AuxSymbol so as to shrink the main Symbol struct. Updates #26186 Change-Id: I803efc561c31a0ca1d93eca434fda1c862a7b2c5 Reviewed-on: https://go-review.googlesource.com/125479 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
f78cc1324a
commit
dd9e81f678
6 changed files with 34 additions and 17 deletions
|
|
@ -1706,7 +1706,7 @@ func ldshlibsyms(ctxt *Link, shlib string) {
|
|||
continue
|
||||
}
|
||||
lsym.Type = sym.SDYNIMPORT
|
||||
lsym.ElfType = elf.ST_TYPE(elfsym.Info)
|
||||
lsym.SetElfType(elf.ST_TYPE(elfsym.Info))
|
||||
lsym.Size = int64(elfsym.Size)
|
||||
if elfsym.Section != elf.SHN_UNDEF {
|
||||
// Set .File for the library that actually defines the symbol.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue