]> Cypherpunks repositories - gostls13.git/commit
cmd/go: address DWARF linker issues with -buildmode=plugin on Darwin
authorThan McIntosh <thanm@google.com>
Wed, 19 Jun 2019 19:14:54 +0000 (15:14 -0400)
committerThan McIntosh <thanm@google.com>
Mon, 11 Nov 2019 17:37:48 +0000 (17:37 +0000)
commit795e8c2317a6a4d728a59caa7550312cdceab367
tree23d51f7f824fc83ccdcf613a3afebe5fad983430
parent64c9ee98b7684cf2156f620cbab4dbb6081b9771
cmd/go: address DWARF linker issues with -buildmode=plugin on Darwin

Assorted fixups in the linker needed to enable turning back on
DWARF generation when building plugins for Darwin. Includes:

 - don't suppress import of runtime/cgo in the linker for
   Darwin if we are linking in plugin mode

 - in calcCompUnitRanges handle the case where we encounter
   linker-generated functions that have no associated Unit (and
   also have no DWARF)

 - generalize a guard in relocsym() include so as to avoid
   triggering a spurious error on go.info symbols in plugin mode

Updates #21647.
Updates #27502.

Change-Id: I317fea97bef2f3461e31498e63f9fd6d8b8f4b23
Reviewed-on: https://go-review.googlesource.com/c/go/+/182959
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/dwarf.go
src/cmd/link/internal/ld/lib.go