]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: keep loader symbol info in sym.CompilationUnit
authorThan McIntosh <thanm@google.com>
Thu, 21 Nov 2019 21:03:58 +0000 (16:03 -0500)
committerThan McIntosh <thanm@google.com>
Mon, 6 Jan 2020 18:46:13 +0000 (18:46 +0000)
commit186e783730e144e99e2f5e2e8b9e02656f7e2c9f
tree5cb814ddf61bb415ca8054c8c1bed05802ce4363
parent6b0b7aca8aab3c09ccb4e683eb99977a33af5591
[dev.link] cmd/link: keep loader symbol info in sym.CompilationUnit

In sym.Library and sym.CompilationUnit there are slices of *sym.Symbol
pointer that hold text symbols contained in the unit lib. To support
DWARF generation with new loader, add equivalent slices that hold
loader.Sym values for functions in scope. This will be needed if at
some point we push the sym.Symbol creation "wavefront" beyond dwarf
gen.

This patch also insures that live host object symbols are added to the
context Textp2 slice, since they would not make it on otherwise.
[NB: not sure if this is the best way to do this.]

Change-Id: I4f440e12cebc525b1e37082ad39cf7338aeb6b99
Reviewed-on: https://go-review.googlesource.com/c/go/+/208231
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/ld/deadcode.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/sym/compilation_unit.go
src/cmd/link/internal/sym/library.go