cmd/internal/obj/x86, cmd/link/internal/x86: support IE model TLS on linux/386

This includes the first parts of the general approach to PIC: load PC into CX
whenever it is needed. This is going to lead to large binaries and poor
performance but it's a start and easy to get right.

Change-Id: Ic8bf1d0a74284cca0d94a68cf75024e8ab063b4e
Reviewed-on: https://go-review.googlesource.com/16383
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Michael Hudson-Doyle 2015-10-28 11:40:22 +13:00
parent 61da0e92d0
commit 3bf61fb2e5
4 changed files with 106 additions and 17 deletions

View file

@ -1669,7 +1669,7 @@ func stkcheck(up *Chain, depth int) int {
// should never be called directly.
// only diagnose the direct caller.
// TODO(mwhudson): actually think about this.
if depth == 1 && s.Type != obj.SXREF && !DynlinkingGo() {
if depth == 1 && s.Type != obj.SXREF && !DynlinkingGo() && Buildmode != BuildmodePIE {
Diag("call to external function %s", s.Name)
}
return -1