aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMinux Ma <minux@golang.org>2015-03-08 23:23:33 +0000
committerMinux Ma <minux@golang.org>2015-03-08 23:25:47 +0000
commit0d0124daa0a1edc6cf65a3c8a5529d110a0a88ea (patch)
treef08174a38dc6990c6382055ac5e94a78ef28333c /src
parente73981512fdc5e1128a9b17c4b9788c600db23ea (diff)
downloadgo-0d0124daa0a1edc6cf65a3c8a5529d110a0a88ea.tar.xz
Revert "cmd/internal/obj/x86: implement -shared computation of TLS base"
Fix the build. This reverts commit e73981512fdc5e1128a9b17c4b9788c600db23ea. Change-Id: I979e138991c06b3295be08212d3ce80b30c2381b Reviewed-on: https://go-review.googlesource.com/7160 Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/internal/obj/x86/asm6.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go
index 096c37a29f..ae47801249 100644
--- a/src/cmd/internal/obj/x86/asm6.go
+++ b/src/cmd/internal/obj/x86/asm6.go
@@ -3765,39 +3765,6 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
ctxt.Andptr = ctxt.Andptr[1:]
asmand(ctxt, p, &pp.From, &p.To)
- case obj.Hlinux:
- if ctxt.Flag_shared == 0 {
- log.Fatalf("unknown TLS base location for linux without -shared")
- }
- // Note that this is not generating the same insn as the other cases.
- // MOV TLS, R_to
- // becomes
- // movq g@gottpoff(%rip), R_to
- // which is encoded as
- // movq 0(%rip), R_to
- // and a R_TLS_IE reloc. This all assumes the only tls variable we access
- // is g, which we can't check here, but will when we assemble the second
- // instruction.
- ctxt.Rexflag = Pw | (regrex[p.To.Reg] & Rxr)
-
- ctxt.Andptr[0] = 0x8B
- ctxt.Andptr = ctxt.Andptr[1:]
- ctxt.Andptr[0] = byte(0x05 | (reg[p.To.Reg] << 3))
- ctxt.Andptr = ctxt.Andptr[1:]
- r = obj.Addrel(ctxt.Cursym)
- r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
- r.Type = obj.R_TLS_IE
- r.Siz = 4
- r.Add = -4
- ctxt.Andptr[0] = 0x00
- ctxt.Andptr = ctxt.Andptr[1:]
- ctxt.Andptr[0] = 0x00
- ctxt.Andptr = ctxt.Andptr[1:]
- ctxt.Andptr[0] = 0x00
- ctxt.Andptr = ctxt.Andptr[1:]
- ctxt.Andptr[0] = 0x00
- ctxt.Andptr = ctxt.Andptr[1:]
-
case obj.Hplan9:
if ctxt.Plan9privates == nil {
ctxt.Plan9privates = obj.Linklookup(ctxt, "_privates", 0)