]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: check for dwarf enabled in loadlibfull
authorThan McIntosh <thanm@google.com>
Thu, 5 Mar 2020 15:58:02 +0000 (10:58 -0500)
committerThan McIntosh <thanm@google.com>
Tue, 10 Mar 2020 14:17:13 +0000 (14:17 +0000)
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>
src/cmd/link/internal/ld/dwarf.go

index 65b5872a6fe780222d22ad1a474b7349e7bfe8b3..0d8c2acb9575e28a0353bf5fb012a73a6d907202 100644 (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