diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-04-01 12:17:04 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-04-01 18:30:26 +0000 |
commit | 8cc515ad3fe9f7f45470713ff1cd4faf323aef6a (patch) | |
tree | b4d579bec4116610ae33156e74ee41a501cb6590 | |
parent | cc3039f818a372274180834385718d2dfccb1a26 (diff) | |
download | go-8cc515ad3fe9f7f45470713ff1cd4faf323aef6a.tar.gz go-8cc515ad3fe9f7f45470713ff1cd4faf323aef6a.zip |
[dev.link] cmd/link: stop marking DWARF constant symbols
DWARF constant symbols were always marked and converted to
sym.Symbols when DWARF generation uses sym.Symbols. Now that the
DWARF generation uses the loader, no need to force-mark them.
Change-Id: Ia4032430697cfa901fb4b6d106a483973277ea0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/226803
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
-rw-r--r-- | src/cmd/link/internal/ld/deadcode2.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/cmd/link/internal/ld/deadcode2.go b/src/cmd/link/internal/ld/deadcode2.go index 59f207b278..3342efe39f 100644 --- a/src/cmd/link/internal/ld/deadcode2.go +++ b/src/cmd/link/internal/ld/deadcode2.go @@ -6,7 +6,6 @@ package ld import ( "bytes" - "cmd/internal/dwarf" "cmd/internal/objabi" "cmd/internal/sys" "cmd/link/internal/loader" @@ -101,14 +100,6 @@ func (d *deadcodePass2) init() { names = append(names, exp) } - // DWARF constant DIE symbols are not referenced, but needed by - // the dwarf pass. - if !*FlagW { - for _, lib := range d.ctxt.Library { - names = append(names, dwarf.ConstInfoPrefix+lib.Pkg) - } - } - for _, name := range names { // Mark symbol as a data/ABI0 symbol. d.mark(d.ldr.Lookup(name, 0), 0) |