mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
5e49bfec92
commit
658a338f78
12 changed files with 20 additions and 20 deletions
|
|
@ -170,7 +170,7 @@ func Linknew(arch *LinkArch) *Link {
|
|||
Hopenbsd,
|
||||
Hdragonfly,
|
||||
Hsolaris:
|
||||
ctxt.Tlsoffset = -2 * ctxt.Arch.Ptrsize
|
||||
ctxt.Tlsoffset = -1 * ctxt.Arch.Ptrsize
|
||||
|
||||
case Hnacl:
|
||||
switch ctxt.Arch.Thechar {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue