From a5cb76243af54a6729f5668317fb87baa242b9cc Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 2 Sep 2015 11:23:15 +1200 Subject: cmd/internal/obj, cmd/link, runtime: lots of TLS cleanup It's particularly nice to get rid of the android special cases in the linker. Change-Id: I516363af7ce8a6b2f196fe49cb8887ac787a6dad Reviewed-on: https://go-review.googlesource.com/14197 Run-TryBot: Michael Hudson-Doyle TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/cmd/internal/obj/arm/obj5.go | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/cmd/internal/obj/arm/obj5.go') diff --git a/src/cmd/internal/obj/arm/obj5.go b/src/cmd/internal/obj/arm/obj5.go index d9f587b087..00ab13ccc3 100644 --- a/src/cmd/internal/obj/arm/obj5.go +++ b/src/cmd/internal/obj/arm/obj5.go @@ -129,24 +129,6 @@ func progedit(ctxt *obj.Link, p *obj.Prog) { p.From.Offset = 0 } } - - if ctxt.Flag_shared != 0 { - // Shared libraries use R_ARM_TLS_IE32 instead of - // R_ARM_TLS_LE32, replacing the link time constant TLS offset in - // runtime.tlsg with an address to a GOT entry containing the - // offset. Rewrite $runtime.tlsg(SB) to runtime.tlsg(SB) to - // compensate. - if ctxt.Tlsg == nil { - ctxt.Tlsg = obj.Linklookup(ctxt, "runtime.tlsg", 0) - } - - if p.From.Type == obj.TYPE_ADDR && p.From.Name == obj.NAME_EXTERN && p.From.Sym == ctxt.Tlsg { - p.From.Type = obj.TYPE_MEM - } - if p.To.Type == obj.TYPE_ADDR && p.To.Name == obj.NAME_EXTERN && p.To.Sym == ctxt.Tlsg { - p.To.Type = obj.TYPE_MEM - } - } } // Prog.mark -- cgit v1.3-5-g9baa