]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/ld, runtime: halve tlsoffset on ELF/intel
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Wed, 4 Mar 2015 03:28:45 +0000 (16:28 +1300)
committerIan Lance Taylor <iant@golang.org>
Thu, 5 Mar 2015 01:23:29 +0000 (01:23 +0000)
commit658a338f78ef5dce4c81527c34fb52be95357ef7
tree76c9bd732f7933488f6ed0a775b0ecb252469f6a
parent5e49bfec92e04ca9eda715c8d61690ba5b47b9bf
cmd/internal/ld, runtime: halve tlsoffset on ELF/intel

For OSes that use elf on intel, 2*Ptrsize bytes are reserved for TLS.
But only one pointer (g) has been stored in the TLS for a while now.
So we can set it to just Ptrsize, which happily matches what happens
when externally linking.

Fixes #9913

Change-Id: Ic816369d3a55a8cdcc23be349b1a1791d53f5f81
Reviewed-on: https://go-review.googlesource.com/6584
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
12 files changed:
src/cmd/internal/ld/sym.go
src/cmd/internal/obj/sym.go
src/runtime/sys_dragonfly_386.s
src/runtime/sys_dragonfly_amd64.s
src/runtime/sys_freebsd_386.s
src/runtime/sys_freebsd_amd64.s
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s
src/runtime/sys_netbsd_386.s
src/runtime/sys_netbsd_amd64.s
src/runtime/sys_openbsd_386.s
src/runtime/sys_openbsd_amd64.s