From 7347b54727519eecf693e9c10c504dc28611cbbf Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 2 Nov 2025 13:54:22 -0800 Subject: cmd/link: don't generate .gosymtab section Since Go 1.2 the section is always empty. Also remove the code looking for .gosymtab in cmd/internal/objfile. For #76038 Change-Id: Icd34c870ed0c6da8001e8d32305f79905ee2b066 Reviewed-on: https://go-review.googlesource.com/c/go/+/717200 LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui Auto-Submit: Ian Lance Taylor Commit-Queue: Ian Lance Taylor Reviewed-by: Michael Pratt --- src/debug/gosym/symtab.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/debug') diff --git a/src/debug/gosym/symtab.go b/src/debug/gosym/symtab.go index bf38927254..08d46684bf 100644 --- a/src/debug/gosym/symtab.go +++ b/src/debug/gosym/symtab.go @@ -332,7 +332,8 @@ func walksymtab(data []byte, fn func(sym) error) error { // NewTable decodes the Go symbol table (the ".gosymtab" section in ELF), // returning an in-memory representation. -// Starting with Go 1.3, the Go symbol table no longer includes symbol data. +// Starting with Go 1.3, the Go symbol table no longer includes symbol data; +// callers should pass nil for the symtab parameter. func NewTable(symtab []byte, pcln *LineTable) (*Table, error) { var n int err := walksymtab(symtab, func(s sym) error { -- cgit v1.3-5-g9baa