From 7735dfb67c2c18274e70582b23846ef9f854c31a Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Mon, 4 Apr 2016 10:49:55 -0700 Subject: [PATCH] cmd/compile: give TLS relocations a name when dumping assembly Before: ... 0x00d0 ff ff ff e8 00 00 00 00 e9 23 ff ff ff cc cc cc .........#...... rel 5+4 t=14 +0 rel 82+4 t=13 runtime.writeBarrier+0 ... After: ... 0x00d0 ff ff ff e8 00 00 00 00 e9 23 ff ff ff cc cc cc .........#...... rel 5+4 t=14 TLS+0 rel 82+4 t=13 runtime.writeBarrier+0 ... Change-Id: Ibdaf694581b5fd5fb87fa8ce6a792f3eb4493622 Reviewed-on: https://go-review.googlesource.com/21545 Reviewed-by: Brad Fitzpatrick --- src/cmd/internal/obj/objfile.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go index a8d86b52cdf..30a380fadf7 100644 --- a/src/cmd/internal/obj/objfile.go +++ b/src/cmd/internal/obj/objfile.go @@ -553,6 +553,8 @@ func (w *objWriter) writeSymDebug(s *LSym) { name := "" if r.Sym != nil { name = r.Sym.Name + } else if r.Type == R_TLS_LE { + name = "TLS" } if ctxt.Arch.Thechar == '5' || ctxt.Arch.Thechar == '9' { fmt.Fprintf(ctxt.Bso, "\trel %d+%d t=%d %s+%x\n", int(r.Off), r.Siz, r.Type, name, uint64(int64(r.Add)))