Skip to content

Commit f765dcb

Browse files
committed
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 <[email protected]> Run-TryBot: Than McIntosh <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 23cc16c commit f765dcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/internal/obj/objfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ func (ctxt *Link) writeSymDebugNamed(s *LSym, name string) {
734734
if r.Sym != nil {
735735
name = r.Sym.Name
736736
if ctxt.Debugasm > 1 {
737-
ver = fmt.Sprintf("<%d>", s.ABI())
737+
ver = fmt.Sprintf("<%d>", r.Sym.ABI())
738738
}
739739
} else if r.Type == objabi.R_TLS_LE {
740740
name = "TLS"

0 commit comments

Comments
 (0)