Source file src/cmd/cgo/internal/test/callstub_linux_ppc64x.go
1 // Copyright 2023 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build (ppc64 || ppc64le) && linux && cgo 6 7 package cgotest 8 9 // extern int notoc_func(void); 10 // int TestPPC64Stubs(void) { 11 // return notoc_func(); 12 // } 13 import "C" 14 import "testing" 15 16 func testPPC64CallStubs(t *testing.T) { 17 // Verify the trampolines run on the testing machine. If they 18 // do not, or are missing, a crash is expected. 19 if C.TestPPC64Stubs() != 0 { 20 t.Skipf("This test requires binutils 2.35 or newer.") 21 } 22 } 23