aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_amd64.s
diff options
context:
space:
mode:
authorElias Naur <mail@eliasnaur.com>2019-04-08 17:57:53 +0200
committerElias Naur <mail@eliasnaur.com>2019-04-08 20:21:51 +0000
commitf18c31a49c1105be0341b32392a433cf65f227da (patch)
tree415cc2ec371e080b634b73b4e529737668a194d2 /src/runtime/asm_amd64.s
parent973c0312e36fd56b6b2111a07a19de63e0dcbf03 (diff)
downloadgo-f18c31a49c1105be0341b32392a433cf65f227da.tar.gz
go-f18c31a49c1105be0341b32392a433cf65f227da.zip
runtime,runtime/cgo: set up TLS storage for Android Q without cgo
Android Q frees a static TLS slot for us to use. Use the offset of that slot as the default for our TLS offset. As a result, runtime/cgo is no more a requirement for Android Q and newer. Updates #31343 Updates #29674 Change-Id: I759049b2e2865bd3d4fdc05a8cfc6db8b0da1f5d Reviewed-on: https://go-review.googlesource.com/c/go/+/170955 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/asm_amd64.s')
-rw-r--r--src/runtime/asm_amd64.s3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index 149b04dfdf..7b2fdf0d3d 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -1713,5 +1713,8 @@ TEXT runtime·panicSlice3CU(SB),NOSPLIT,$0-16
JMP runtime·goPanicSlice3CU(SB)
#ifdef GOOS_android
+// Use the free TLS_SLOT_APP slot #2 on Android Q.
+// Earlier androids are set up in gcc_android.c.
+DATA runtime·tls_g+0(SB)/8, $16
GLOBL runtime·tls_g+0(SB), NOPTR, $8
#endif