]> Cypherpunks repositories - gostls13.git/commit
runtime: access _cgo_yield indirectly
authorCherry Zhang <cherryyz@google.com>
Fri, 24 Mar 2017 02:47:56 +0000 (22:47 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 24 Mar 2017 15:37:56 +0000 (15:37 +0000)
commit3a1ce1085ad08296557e8a87573fae4634ce7d8e
tree5b0391e8e96fad3998dfcf6156eb50a989eef93a
parent48de5a85fbc452bfc3af7422cd8aba0fab132d3d
runtime: access _cgo_yield indirectly

The darwin linker for ARM does not allow PC-relative relocation
of external symbol in text section. Work around it by accessing
it indirectly: putting its address in a global variable (which is
not external), and accessing through that variable.

Fixes #19684.

Change-Id: I41361bbb281b5dbdda0d100ae49d32c69ed85a81
Reviewed-on: https://go-review.googlesource.com/38596
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Elias Naur <elias.naur@gmail.com>
src/runtime/cgo.go
src/runtime/lock_futex.go
src/runtime/lock_sema.go
src/runtime/proc.go