aboutsummaryrefslogtreecommitdiff
path: root/src/net/dnsclient_unix_test.go
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2021-06-08 20:09:49 -0400
committerDmitri Shuralyov <dmitshur@golang.org>2021-06-29 17:38:19 +0000
commitb51bf4febc32dfa6bb3c1cf467f1513a1d6d8b75 (patch)
treedb76e43bd592df5a97811faafa025c85484c8e6a /src/net/dnsclient_unix_test.go
parent0e7012ef8662b31e9da05cf39b2ec01301620810 (diff)
downloadgo-b51bf4febc32dfa6bb3c1cf467f1513a1d6d8b75.tar.gz
go-b51bf4febc32dfa6bb3c1cf467f1513a1d6d8b75.zip
[release-branch.go1.15] cmd/link: fix handling of dupok mapzero syms
The compiler machinery that generates "map.zero" symbols marks them as RODATA and DUPOK, which is problematic when a given application has multiple map zero symbols (from different packages) with varying sizes: the dupok path in the loader assumes that if two symbols have the same name, it is safe to pick any of the versions. In the case of map.zero, the link needs to select the largest symbol, not an arbitrary sym. This patch changes the linker's dupok symbol loading path to detect this problem, and in situations where we're loading a dupok symbol whose name is the same as an existing symbol but whose size is large, select the new dup over the old. Note: this fix differs from the one used in 1.16/1.17, which uses content-addressable symbols instead. Fixes #46656. Change-Id: Iabd2feef01d448670ba795c7eaddc48c191ea276 Reviewed-on: https://go-review.googlesource.com/c/go/+/326211 Trust: Than McIntosh <thanm@google.com> Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> (cherry picked from commit aa5540cd82170f82c6fe11511e12de96aa58cbc1) Reviewed-on: https://go-review.googlesource.com/c/go/+/326213
Diffstat (limited to 'src/net/dnsclient_unix_test.go')
0 files changed, 0 insertions, 0 deletions