From bdb804466568c79e488a7b16f6ffd045f2dc6dfa Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Thu, 6 May 2021 16:16:19 -0400 Subject: [PATCH] cmd/link: don't include arginfo symbols in symbol table We recently add arginfo symbols for traceback argument metadata. Like other metadata symbols (GC bitmaps, opendefer info, etc.), skip arginfo symbols for symbol table as well. Fixes #45971. Change-Id: I7a126b75f70ec88e2170e9a274d968762c7bce56 Reviewed-on: https://go-review.googlesource.com/c/go/+/317769 Trust: Cherry Mui Run-TryBot: Cherry Mui TryBot-Result: Go Bot Reviewed-by: Than McIntosh --- src/cmd/link/internal/ld/symtab.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmd/link/internal/ld/symtab.go b/src/cmd/link/internal/ld/symtab.go index 3b4fda0c89a..00f557875a9 100644 --- a/src/cmd/link/internal/ld/symtab.go +++ b/src/cmd/link/internal/ld/symtab.go @@ -585,7 +585,9 @@ func (ctxt *Link) symtab(pcln *pclntab) []sym.SymKind { strings.HasPrefix(name, "gclocals."), strings.HasPrefix(name, "gclocals·"), ldr.SymType(s) == sym.SGOFUNC && s != symgofunc, - strings.HasSuffix(name, ".opendefer"): + strings.HasSuffix(name, ".opendefer"), + strings.HasSuffix(name, ".arginfo0"), + strings.HasSuffix(name, ".arginfo1"): symGroupType[s] = sym.SGOFUNC ldr.SetAttrNotInSymbolTable(s, true) ldr.SetCarrierSym(s, symgofunc)