]> Cypherpunks repositories - gostls13.git/commit
cmd/link: fix accidentally-quadratic library loading
authorRuss Cox <rsc@golang.org>
Wed, 31 May 2017 15:33:04 +0000 (11:33 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 5 Jun 2017 19:56:34 +0000 (19:56 +0000)
commit51711d1429cb592c9ddc772e6362e74ac8545dc8
tree8b0dfe79941e57b88401a6f00906834ebd814959
parent6a42568701b9e35ced4bc5fccadd5569b676d972
cmd/link: fix accidentally-quadratic library loading

Programs built from N libraries required O(N²) time to do the
deduplication checks, even if there were never any duplicates.
In most programs N is small enough not to worry, but this may
affect large programs.

Noticed by inspection, not any specific bug report.

Fixes #20578.

Change-Id: Ic4108f1058be39da990a79b1e0b8ce95fde44cef
Reviewed-on: https://go-review.googlesource.com/44852
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/ld/ld.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/sym.go