aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/objdump/testdata/testfilenum
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-10-15 18:04:08 -0400
committerCherry Zhang <cherryyz@google.com>2020-10-16 14:40:50 +0000
commit20819440fc65d28fabe8f7410ea8fe193cdc53c6 (patch)
tree5931d686fceff113e541b5214a664db7bce708ae /src/cmd/objdump/testdata/testfilenum
parent771f5f2e487db4eb2bcf6fa1660dc8cef1feaf14 (diff)
downloadgo-20819440fc65d28fabe8f7410ea8fe193cdc53c6.tar.xz
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 <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'src/cmd/objdump/testdata/testfilenum')
-rw-r--r--src/cmd/objdump/testdata/testfilenum/a.go7
-rw-r--r--src/cmd/objdump/testdata/testfilenum/b.go7
-rw-r--r--src/cmd/objdump/testdata/testfilenum/c.go7
-rw-r--r--src/cmd/objdump/testdata/testfilenum/go.mod3
4 files changed, 24 insertions, 0 deletions
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() {}
diff --git a/src/cmd/objdump/testdata/testfilenum/b.go b/src/cmd/objdump/testdata/testfilenum/b.go
new file mode 100644
index 0000000000..a632aafe7b
--- /dev/null
+++ b/src/cmd/objdump/testdata/testfilenum/b.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 B() {}
diff --git a/src/cmd/objdump/testdata/testfilenum/c.go b/src/cmd/objdump/testdata/testfilenum/c.go
new file mode 100644
index 0000000000..d73efa7315
--- /dev/null
+++ b/src/cmd/objdump/testdata/testfilenum/c.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 C() {}
diff --git a/src/cmd/objdump/testdata/testfilenum/go.mod b/src/cmd/objdump/testdata/testfilenum/go.mod
new file mode 100644
index 0000000000..db432883a9
--- /dev/null
+++ b/src/cmd/objdump/testdata/testfilenum/go.mod
@@ -0,0 +1,3 @@
+module objdumptest
+
+go 1.16