]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: simplify filename handling
authorMatthew Dempsky <mdempsky@google.com>
Mon, 28 Aug 2023 12:13:03 +0000 (05:13 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 1 Sep 2023 15:52:41 +0000 (15:52 +0000)
commitc9bb7ce2d7132debe50f024c50ed4ee1460d6af5
tree60a390801d54850fd742783abd0ec7a2bbdcb728
parent06f420fc19f8af6a1935e4edbfd1af361f663190
cmd/internal/obj: simplify filename handling

The old Go object file format used linker symbols like "gofile..foo"
to record references to the filename "foo". But the current object
file format has a dedicated section for file names, so we don't need
these useless prefixes anymore.

Also, change DWARF generation to pass around the src.Pos directly,
rather than the old file symbols, which it just turned back into a
file index before writing out anyway.

Finally, directly record the FileIndex into src.PosBase, so that we
can skip the map lookups.

Change-Id: Ia4a5ebfa95da271f2522e45befdb9f137c16d373
Reviewed-on: https://go-review.googlesource.com/c/go/+/523378
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/dwarfgen/dwinl.go
src/cmd/internal/dwarf/dwarf.go
src/cmd/internal/obj/dwarf.go
src/cmd/internal/obj/line.go
src/cmd/internal/obj/line_test.go
src/cmd/internal/obj/plist.go
src/cmd/internal/obj/sym.go
src/cmd/internal/src/pos.go
src/cmd/internal/src/xpos.go
src/cmd/internal/src/xpos_test.go
src/cmd/link/internal/ld/dwarf.go