mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: split out Extname into cold portion of sym.Symbol
Create a new "AuxSymbol" struct into which 'cold' or 'infrequently set' symbol fields are located. Move the Extname field from the main Symbol struct to AuxSymbol. Updates #26186 Change-Id: I9e795fb0cc48f978e2818475fa073ed9f2db202d Reviewed-on: https://go-review.googlesource.com/125476 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
289dce24c1
commit
09df9b06a1
8 changed files with 70 additions and 44 deletions
|
|
@ -435,7 +435,7 @@ func (ctxt *Link) loadlib() {
|
|||
// cgo_import_static and cgo_import_dynamic,
|
||||
// then we want to make it cgo_import_dynamic
|
||||
// now.
|
||||
if s.Extname != "" && s.Dynimplib() != "" && !s.Attr.CgoExport() {
|
||||
if s.Extname() != "" && s.Dynimplib() != "" && !s.Attr.CgoExport() {
|
||||
s.Type = sym.SDYNIMPORT
|
||||
} else {
|
||||
s.Type = 0
|
||||
|
|
@ -2116,7 +2116,7 @@ func genasmsym(ctxt *Link, put func(*Link, *sym.Symbol, string, SymbolType, int6
|
|||
if !s.Attr.Reachable() {
|
||||
continue
|
||||
}
|
||||
put(ctxt, s, s.Extname, UndefinedSym, 0, nil)
|
||||
put(ctxt, s, s.Extname(), UndefinedSym, 0, nil)
|
||||
|
||||
case sym.STLSBSS:
|
||||
if ctxt.LinkMode == LinkExternal {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue