]> Cypherpunks repositories - gostls13.git/commit
debug/gosym: use "go build" instead of hand-running asm and link
authorAustin Clements <austin@google.com>
Thu, 1 Nov 2018 18:34:21 +0000 (14:34 -0400)
committerAustin Clements <austin@google.com>
Mon, 12 Nov 2018 20:27:20 +0000 (20:27 +0000)
commit571236543f222e9fcb8ddfaa3151505a7de4d6f0
tree94e6e8e1bcfe8c477f48e5ec689da9a62cefd5b9
parentaf1bfe0aa39091a4103bd29d8659f6267aad9df0
debug/gosym: use "go build" instead of hand-running asm and link

Currently, TestPCLine manually invokes asm and link on its test data.
Once we introduce symbol ABIs this is going to become problematic
because the test program defines main.main and main.init in assembly
so they use ABI0, but the runtime expects to find them with the
internal ABI.

There are various ways we could solve this. This CL moves main.main
and main.init into Go code and switches to using "go build" to compile
and link the test binary. This has the added advantage of simplifying
this test.

For #27539.

Change-Id: I4c0cf6467f7a39e6b1500eca6ad2620b5ef2b73c
Reviewed-on: https://go-review.googlesource.com/c/146857
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/debug/gosym/pclntab_test.go
src/debug/gosym/testdata/main.go [new file with mode: 0644]
src/debug/gosym/testdata/pclinetest.h [moved from src/debug/gosym/pclinetest.h with 100% similarity]
src/debug/gosym/testdata/pclinetest.s [moved from src/debug/gosym/pclinetest.asm with 96% similarity]