]> Cypherpunks repositories - gostls13.git/commit
cmd/link/ld,cmd/internal/obj,runtime: make the Android TLS offset dynamic
authorElias Naur <mail@eliasnaur.com>
Thu, 28 Mar 2019 12:11:53 +0000 (13:11 +0100)
committerElias Naur <mail@eliasnaur.com>
Fri, 29 Mar 2019 17:16:32 +0000 (17:16 +0000)
commit1d10b17589ce651caeb0841b2312065ee44f800d
tree5ac85df676c80f4a0fdf4aa507ef4ecab9d90e5c
parent2cc347382f4df3fb40d8d81ec9331f0748b1c394
cmd/link/ld,cmd/internal/obj,runtime: make the Android TLS offset dynamic

We're going to need a different TLS offset for Android Q, so the static
offsets used for 386 and amd64 are no longer viable on Android.

Introduce runtimeĀ·tls_g and use that for indexing into TLS storage. As
an added benefit, we can then merge the TLS setup code for all android
GOARCHs.

While we're at it, remove a bunch of android special cases no longer
needed.

Updates #29674
Updates #29249 (perhaps fixes it)

Change-Id: I77c7385aec7de8f1f6a4da7c9c79999157e39572
Reviewed-on: https://go-review.googlesource.com/c/go/+/169817
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
14 files changed:
src/cmd/internal/obj/x86/obj6.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/sym.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/cgo/gcc_android.c
src/runtime/cgo/gcc_android_386.c [deleted file]
src/runtime/cgo/gcc_android_amd64.c [deleted file]
src/runtime/cgo/gcc_android_arm.c [deleted file]
src/runtime/cgo/gcc_android_arm64.c [deleted file]
src/runtime/cgo/gcc_linux_386.c
src/runtime/cgo/gcc_linux_amd64.c
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s