]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/objfile: correct file table reading for Go object file
authorCherry Zhang <cherryyz@google.com>
Thu, 15 Oct 2020 22:04:08 +0000 (18:04 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 16 Oct 2020 14:40:50 +0000 (14:40 +0000)
commit20819440fc65d28fabe8f7410ea8fe193cdc53c6
tree5931d686fceff113e541b5214a664db7bce708ae
parent771f5f2e487db4eb2bcf6fa1660dc8cef1feaf14
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>
src/cmd/internal/objfile/goobj.go
src/cmd/objdump/objdump_test.go
src/cmd/objdump/testdata/testfilenum/a.go [new file with mode: 0644]
src/cmd/objdump/testdata/testfilenum/b.go [new file with mode: 0644]
src/cmd/objdump/testdata/testfilenum/c.go [new file with mode: 0644]
src/cmd/objdump/testdata/testfilenum/go.mod [new file with mode: 0644]