]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: convert DWARF type generation to use loader
authorThan McIntosh <thanm@google.com>
Wed, 20 Nov 2019 15:43:11 +0000 (10:43 -0500)
committerThan McIntosh <thanm@google.com>
Wed, 19 Feb 2020 21:15:12 +0000 (21:15 +0000)
commit25f1b093fe02d87c879b1d8d030dc1c65aad7c78
tree5e4e1940165fbacfae0a634ef9095c2bf825f09a
parent6a819b0062c31d741d7672272a6aa9ca7c40d42c
[dev.link] cmd/link: convert DWARF type generation to use loader

Converts the portion of DWARF generation that deals with creation of
type DIEs and constant DIEs to use the new loader interfaces. Creation
of subprogram DIE and compilation unit DIE content still operates on
sym.Symbols at the moment, and happens much later in the linker.

The new code for type DIE generation is gated/guarded by the linker
flag "-newdw", which currently defaults to true. At some point in the
near future this flag should be removed, but it is handy for triage at
the moment.

This patch also includes shim code designed to run after loadlibfull()
that walks through the DIE chains and to converts loader.Sym
references back into sym.Symbol references for the remainder of the
compilation, since the second phase of DWARF has not yet been
converted.

Change-Id: I681a00fb8a1f3c37884a79b373d86411332e07c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/208230
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/ld/deadcode.go
src/cmd/link/internal/ld/dwarf.go
src/cmd/link/internal/ld/dwarf2.go [new file with mode: 0644]
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/main.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/sym/compilation_unit.go