[dev.link] cmd/link: check for dwarf enabled in loadlibfull

Check dwarfEnabled before invoking dwarfConvertSymbols (not needed if
we're not doing dwarf gen).

Change-Id: Id7ea7d11c13524705d305596bf1468d4858216b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/222157
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
Than McIntosh 2020-03-05 10:58:02 -05:00
parent cb2843704e
commit 24064a302c
1 changed files with 3 additions and 0 deletions

View File

@ -2068,6 +2068,9 @@ func dwarfGenerateDebugInfo(ctxt *Link) {
// through dwarf DIE objects and rewrites loader.Sym refs to
// sym.Symbol there as well. This is obviously a temporary function.
func dwarfConvertSymbols(ctxt *Link) {
if !dwarfEnabled(ctxt) {
return
}
if *FlagNewDw2 {
// don't convert since we're running phase 2 with loader
return