From: Than McIntosh Date: Thu, 24 Sep 2020 20:11:43 +0000 (-0400) Subject: cmd/compile,cmd/asm: fix buglet in -S=2 output X-Git-Tag: go1.16beta1~934 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f765dcbd5c8205a0d222257b4514b1194cad26f8;p=gostls13.git cmd/compile,cmd/asm: fix buglet in -S=2 output In CL 255718 the -S=2 assembly output was enhanced to dump symbol ABIs. This patch fixes a bug in that CL: when dumping the relocations on a symbol, we were dumping the symbol's ABI as opposed to the relocation target symbol's ABI. Change-Id: I134128687757f549fa37b998cff1290765889140 Reviewed-on: https://go-review.googlesource.com/c/go/+/257202 Trust: Than McIntosh Run-TryBot: Than McIntosh Reviewed-by: David Chase Reviewed-by: Cherry Zhang TryBot-Result: Go Bot --- diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go index aede5fe71c..e4b9620568 100644 --- a/src/cmd/internal/obj/objfile.go +++ b/src/cmd/internal/obj/objfile.go @@ -734,7 +734,7 @@ func (ctxt *Link) writeSymDebugNamed(s *LSym, name string) { if r.Sym != nil { name = r.Sym.Name if ctxt.Debugasm > 1 { - ver = fmt.Sprintf("<%d>", s.ABI()) + ver = fmt.Sprintf("<%d>", r.Sym.ABI()) } } else if r.Type == objabi.R_TLS_LE { name = "TLS"