aboutsummaryrefslogtreecommitdiff
path: root/misc/cgo/testplugin/test.bash
diff options
context:
space:
mode:
authorAlessandro Arzilli <alessandro.arzilli@gmail.com>2018-04-24 13:05:10 +0200
committerHeschi Kreinick <heschi@google.com>2018-09-04 17:44:41 +0000
commit9c833831b2bdaa465349194797cf3894cb85f9c4 (patch)
tree42c77adeaf1be0399c3586a0a4e10c38fc38237f /misc/cgo/testplugin/test.bash
parent669fa8f36a298cc0e2d1f817ca30c8d613ce7483 (diff)
downloadgo-9c833831b2bdaa465349194797cf3894cb85f9c4.tar.xz
cmd/link: move dwarf part of DWARF generation before type name mangling
Splits part of dwarfgeneratedebugsyms into a new function, dwarfGenerateDebugInfo which is called between deadcode elimination and type name mangling. This function takes care of collecting and processing the DIEs for all functions and package-level variables and also generates DIEs for all types used in the program. Fixes #23733 Change-Id: I75ef0608fbed2dffc3be7a477f1b03e7e740ec61 Reviewed-on: https://go-review.googlesource.com/111237 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
Diffstat (limited to 'misc/cgo/testplugin/test.bash')
-rwxr-xr-xmisc/cgo/testplugin/test.bash4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/cgo/testplugin/test.bash b/misc/cgo/testplugin/test.bash
index bf8ed3cd19..5a87f5e746 100755
--- a/misc/cgo/testplugin/test.bash
+++ b/misc/cgo/testplugin/test.bash
@@ -32,6 +32,10 @@ GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" -buildmode=plugin -o=unnamed1.so u
GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" -buildmode=plugin -o=unnamed2.so unnamed2/main.go
GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" host
+# test that DWARF sections are emitted for plugins and programs importing "plugin"
+go run src/checkdwarf/main.go plugin2.so plugin2.UnexportedNameReuse
+go run src/checkdwarf/main.go host main.main
+
LD_LIBRARY_PATH=$(pwd) ./host
# Test that types and itabs get properly uniqified.