]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: use correct symbol size for Hashed64 classification
authorCherry Zhang <cherryyz@google.com>
Thu, 22 Oct 2020 14:05:44 +0000 (10:05 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 22 Oct 2020 18:16:29 +0000 (18:16 +0000)
commit2ad44158af373f68c1aef528738a5baade77d316
tree9ed95e73ded4221674f5c8f6b46520676ee27d87
parent431d58da69e8c36d654876e7808f971c5667649c
cmd/internal/obj: use correct symbol size for Hashed64 classification

Use sym.Size, instead of len(sym.P), to decide whether a
content-addressable symbol is "short" and hashed as Hashed64.
So we don't dedup a small symbol with a gigantic almost-zero
symbol.

Fixes #42140.

Change-Id: Ic65869e1eaf51947517b3ece49c8b0be1b94bb75
Reviewed-on: https://go-review.googlesource.com/c/go/+/264337
Trust: Cherry Zhang <cherryyz@google.com>
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/internal/obj/sym.go
src/cmd/link/link_test.go