cmd/internal/obj: some platform independent bits of proper toolchain support for thread local storage

Also simplifies some silliness around making the .tbss section wrt internal
vs external linking. The "make TLS make sense" project has quite a few more
steps to go.

Issue #11270

Change-Id: Ia4fa135cb22d916728ead95bdbc0ebc1ae06f05c
Reviewed-on: https://go-review.googlesource.com/13990
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Michael Hudson-Doyle 2015-08-11 12:29:00 +12:00 committed by David Crawshaw
parent 499c827516
commit 9e6ba37b86
6 changed files with 45 additions and 31 deletions

View file

@ -63,6 +63,9 @@ func savedata(ctxt *Link, s *LSym, p *Prog, pn string) {
if ctxt.Enforce_data_order != 0 && off < int32(len(s.P)) {
ctxt.Diag("data out of order (already have %d)\n%v", len(s.P), p)
}
if s.Type == SBSS || s.Type == STLSBSS {
ctxt.Diag("cannot supply data for BSS var")
}
Symgrow(ctxt, s, int64(off+siz))
switch int(p.To.Type) {