mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: correct overwrite logic
This was mistakenly changed during the refactor in CL 201728. Restore the old behavior. Change-Id: I9991859e7587f5f567bbe86ae19dede904b3a399 Reviewed-on: https://go-review.googlesource.com/c/go/+/217062 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
8896a6b8aa
commit
af98efc545
1 changed files with 1 additions and 1 deletions
|
|
@ -322,7 +322,7 @@ func (l *Loader) AddSym(name string, ver int, i Sym, r *oReader, dupok bool, typ
|
|||
if overwrite {
|
||||
// new symbol overwrites old symbol.
|
||||
oldtyp := sym.AbiSymKindToSymKind[objabi.SymKind(oldsym.Type)]
|
||||
if !oldtyp.IsData() && r.DataSize(li) == 0 {
|
||||
if !(oldtyp.IsData() && oldr.DataSize(li) == 0) {
|
||||
log.Fatalf("duplicated definition of symbol " + name)
|
||||
}
|
||||
l.overwrite[oldi] = i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue