]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: demote dwarf {range,loc} sub-symbols to aux
authorThan McIntosh <thanm@google.com>
Mon, 9 Mar 2020 15:42:03 +0000 (11:42 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 12 Mar 2020 18:56:09 +0000 (18:56 +0000)
commit8634642f9aea9c432aa4cf392eba31de96f75726
treebaa87c9300c65d787adcf7ea1b8d141a9f9abeff
parenta6ae6d35e6145cd271dc3775827579d9c8f62df6
[dev.link] cmd/link: demote dwarf {range,loc} sub-symbols to aux

When the compiler emits DWARF for a function F, in addition to the
text symbol for F, it emits a set of sibling or child symbols that
carry the various DWARF bits for F (for example, go.info.F,
go.ranges.F, go.loc.F, and so on).

Prior to the linker modernization work, name lookup was the way you
made your way from a function symbol to one of its child DWARF
symbols. We now have a new mechanism (aux symbols), so there is really
no need for the DWARF sub-symbols to be named or to be dupok.

This patch converts DWARF "range" and "loc" sub-symbols to be pure aux
syms: unnamed, and connected to their parent text symbol only via aux
data. This should presumably have performance benefits in that we add
fewer symbols to the linker lookup tables.

Other related DWARF sub-symbols (ex: go.line.*) will be handled in a
subsequent patch.

Change-Id: Iae3ec2d42452962d4afc1df4a1bd89ccdeadc6e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/222673
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/internal/dwarf/dwarf.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/objfile2.go
src/cmd/internal/obj/plist.go
src/cmd/link/internal/ld/dwarf.go
src/cmd/link/internal/loader/loader.go