diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2023-08-28 05:13:03 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-09-01 15:52:41 +0000 |
| commit | c9bb7ce2d7132debe50f024c50ed4ee1460d6af5 (patch) | |
| tree | 60a390801d54850fd742783abd0ec7a2bbdcb728 /src/cmd/link | |
| parent | 06f420fc19f8af6a1935e4edbfd1af361f663190 (diff) | |
| download | go-c9bb7ce2d7132debe50f024c50ed4ee1460d6af5.tar.xz | |
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>
Diffstat (limited to 'src/cmd/link')
| -rw-r--r-- | src/cmd/link/internal/ld/dwarf.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go index 23285de2e1..36e11cc0d2 100644 --- a/src/cmd/link/internal/ld/dwarf.go +++ b/src/cmd/link/internal/ld/dwarf.go @@ -154,10 +154,6 @@ func (c dwctxt) Logf(format string, args ...interface{}) { // At the moment these interfaces are only used in the compiler. -func (c dwctxt) AddFileRef(s dwarf.Sym, f interface{}) { - panic("should be used only in the compiler") -} - func (c dwctxt) CurrentOffset(s dwarf.Sym) int64 { panic("should be used only in the compiler") } |
