]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: fix data race on AIX
authorCherry Zhang <cherryyz@google.com>
Tue, 23 Jun 2020 21:29:17 +0000 (17:29 -0400)
committerCherry Zhang <cherryyz@google.com>
Wed, 24 Jun 2020 15:04:05 +0000 (15:04 +0000)
commita89fd32316954dea9fa87e45b266eb2e648f7f8e
treeb799ec6f3634593f319e20719981f941c957447b
parentf0cf4d4d7f60ed5ae806e6ed410b346bb2fd0b5a
[dev.link] cmd/link: fix data race on AIX

On AIX, in relocsym we call Xcoffadddynrel, which adds a
relocation record to a global array. relocsym already runs in
parallel. In the past we only parallelize over segments, and
we call Xcoffadddynrel only for symbols in data segment, so it is
effectively called sequentially. In CL 239197 we started to do
more fine-grained parallelism, so we need to make sure it is safe
to call Xcoffadddynrel in parallel.

Fix AIX build.

Change-Id: I3128193995a5a99d9fa04c8e728e590f17298da3
Reviewed-on: https://go-review.googlesource.com/c/go/+/239561
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/ld/xcoff.go