aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/objdump
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/objdump')
-rw-r--r--src/cmd/objdump/objdump_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/objdump/objdump_test.go b/src/cmd/objdump/objdump_test.go
index fa6a1b9a68..b747d0d542 100644
--- a/src/cmd/objdump/objdump_test.go
+++ b/src/cmd/objdump/objdump_test.go
@@ -290,6 +290,10 @@ func TestDisasmPIE(t *testing.T) {
if !platform.BuildModeSupported("gc", "pie", runtime.GOOS, runtime.GOARCH) {
t.Skipf("skipping on %s/%s, PIE buildmode not supported", runtime.GOOS, runtime.GOARCH)
}
+ if !platform.InternalLinkPIESupported(runtime.GOOS, runtime.GOARCH) {
+ // require cgo on platforms that PIE needs external linking
+ testenv.MustHaveCGO(t)
+ }
t.Parallel()
testDisasm(t, "fmthello.go", false, false, "-buildmode=pie")
}