mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: load symbols from .syso in external link mode
Fix linking with a package having a .syso file in external link mode, that would otherwise cause an error before executing the external linker because it can't find symbols that are exported in the said .syso file. Fixes #33139 Change-Id: Id3ee737fba1c6f1e37910593dfedf9c84486d398 Reviewed-on: https://go-review.googlesource.com/c/go/+/186417 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
27cf81e1b4
commit
5e514b76e2
10 changed files with 76 additions and 16 deletions
|
|
@ -2348,7 +2348,7 @@ func genasmsym(ctxt *Link, put func(*Link, *sym.Symbol, string, SymbolType, int6
|
|||
}
|
||||
put(ctxt, s, s.Name, BSSSym, Symaddr(s), s.Gotype)
|
||||
|
||||
case sym.SHOSTOBJ:
|
||||
case sym.SHOSTOBJ, sym.SUNDEFEXT:
|
||||
if ctxt.HeadType == objabi.Hwindows || ctxt.IsELF {
|
||||
put(ctxt, s, s.Name, UndefinedSym, s.Value, nil)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue