From 20819440fc65d28fabe8f7410ea8fe193cdc53c6 Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Thu, 15 Oct 2020 18:04:08 -0400 Subject: cmd/internal/objfile: correct file table reading for Go object file Apparently I never actually understood the new file table in Go object files. The PC value stream actually encodes the file index in the per-CU table. I thought it was indexing into a per-function table, which then contains index to the per-CU table. Remove the extra indirection. Change-Id: I0aea5629f7b3888ebe3a04fea437aa15ce89519e Reviewed-on: https://go-review.googlesource.com/c/go/+/262779 Trust: Cherry Zhang Run-TryBot: Cherry Zhang TryBot-Result: Go Bot Reviewed-by: Than McIntosh Reviewed-by: Jeremy Faller --- src/cmd/objdump/testdata/testfilenum/a.go | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/cmd/objdump/testdata/testfilenum/a.go (limited to 'src/cmd/objdump/testdata/testfilenum/a.go') diff --git a/src/cmd/objdump/testdata/testfilenum/a.go b/src/cmd/objdump/testdata/testfilenum/a.go new file mode 100644 index 0000000000..2729ae0abf --- /dev/null +++ b/src/cmd/objdump/testdata/testfilenum/a.go @@ -0,0 +1,7 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package p + +func A() {} -- cgit v1.3