aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/crash_cgo_test.go
diff options
context:
space:
mode:
authorLynn Boger <laboger@linux.vnet.ibm.com>2017-10-27 10:06:40 -0400
committerLynn Boger <laboger@linux.vnet.ibm.com>2017-10-30 12:59:31 +0000
commit58de9f358375e87f07605852530383fee0a4b671 (patch)
tree11215cec863f359ac2b998759c2eb50c099dc436 /src/runtime/crash_cgo_test.go
parent3c46f49f9449eba44eebf318e59f18db79e7bd18 (diff)
downloadgo-58de9f358375e87f07605852530383fee0a4b671.tar.gz
go-58de9f358375e87f07605852530383fee0a4b671.zip
runtime: use -buildmode=pie in testCgoPprofPIE instead of -extldflags=-pie
Errors occur in runtime test testCgoPprofPIE when the test is built by passing -pie to the external linker with code that was not built as PIC. This occurs on ppc64le because non-PIC is the default, and fails only on newer distros where the address range used for programs is high enough to cause relocation overflow. This test should be built with -buildmode=pie since that correctly generates PIC with -pie. Related issues are #21954 and #22126. Updates #22459 Change-Id: Ib641440bc9f94ad2b97efcda14a4b482647be8f7 Reviewed-on: https://go-review.googlesource.com/73970 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/crash_cgo_test.go')
-rw-r--r--src/runtime/crash_cgo_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go
index df7b367c5d..cad2b2ac22 100644
--- a/src/runtime/crash_cgo_test.go
+++ b/src/runtime/crash_cgo_test.go
@@ -330,7 +330,7 @@ func TestCgoPprof(t *testing.T) {
}
func TestCgoPprofPIE(t *testing.T) {
- testCgoPprof(t, "-ldflags=-extldflags=-pie", "CgoPprof")
+ testCgoPprof(t, "-buildmode=pie", "CgoPprof")
}
func TestCgoPprofThread(t *testing.T) {