]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj, cmd/link, runtime: handle TLS more like a platform linker on ppc64
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Thu, 29 Oct 2015 21:13:13 +0000 (10:13 +1300)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Thu, 29 Oct 2015 22:24:29 +0000 (22:24 +0000)
commitc9b8cab16c457fec7cf897c2d37a266e60f99a25
treed6b85514768172a98f00160cc5c55dfce2491b5f
parenta59a27564b6d2a2fdf53eb43b3f8d6e7d0117e10
cmd/internal/obj, cmd/link, runtime: handle TLS more like a platform linker on ppc64

On ppc64x, the thread pointer, held in R13, points 0x7000 bytes past where
thread-local storage begins (presumably to maximize the amount of storage that
can be accessed with a 16-bit signed displacement). The relocations used to
indicate thread-local storage to the platform linker account for this, so to be
able to support external linking we need to change things so the linker applies
this offset instead of the runtime assembly.

Change-Id: I2556c249ab2d802cae62c44b2b4c5b44787d7059
Reviewed-on: https://go-review.googlesource.com/14233
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/internal/obj/link.go
src/cmd/internal/obj/ppc64/a.out.go
src/cmd/internal/obj/ppc64/anames9.go
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/link/internal/ppc64/asm.go
src/runtime/tls_ppc64x.s