]> Cypherpunks repositories - gostls13.git/commit
runtime: correct the TLS base offset on Android
authorElias Naur <mail@eliasnaur.com>
Mon, 8 Apr 2019 21:12:52 +0000 (23:12 +0200)
committerElias Naur <mail@eliasnaur.com>
Wed, 10 Apr 2019 14:21:20 +0000 (14:21 +0000)
commiteddb41eb2cb7699f3515a229ff069ca914c7c879
treed8c9247457ff5959b5525f32dff74f4fa45580f5
parent9a0a150c9f50f920f35cc4d50ac3005503f44f2d
runtime: correct the TLS base offset on Android

CL 170955 set tlsg to the Android Q free TLS slot offset in the linker
data (16 on amd64, 8 on 386), offsetting all TLS relative access.
We need the 0'th slot (TLS_SLOT_SELF) at initialization, so
compensate with a corresponding negative offset.

Fixes the android/386 and android/amd64 builders broken by CL 170955.

Change-Id: I9882088c0c8bc6a777d2aabc9404cb76f02b6cea
Reviewed-on: https://go-review.googlesource.com/c/go/+/170956
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/asm_386.s
src/runtime/asm_amd64.s