]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/internal/dwarf: expand import path in function DIE
authorCherry Zhang <cherryyz@google.com>
Sat, 2 Nov 2019 14:42:50 +0000 (10:42 -0400)
committerCherry Zhang <cherryyz@google.com>
Sun, 3 Nov 2019 04:58:01 +0000 (04:58 +0000)
commit32190b0a492f92871d39dd252c1d2a11cbfbadc8
tree85d155863df0f0ac3a774353d9cf358e2a75646e
parentc6621d9241c1835806fbc85ca9893d90af035fc4
[dev.link] cmd/internal/dwarf: expand import path in function DIE

Currently, at compile time we emit a function DIE with '"".' in
the function name, and we expand it at link time, with a really
ugly function. We can just expand it at compile time instead.
This way, we don't need to modify the symbol content at link time,
and also no need to allocate memory for that.

Keep the linker expansion, in case the compiler is invoked
without the import path.

Change-Id: Id53cd2e2d3eb61efceb8d44479c4b6ef890baa43
Reviewed-on: https://go-review.googlesource.com/c/go/+/204826
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/internal/dwarf/dwarf.go