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 package cgotest 6 7 // extern int notoc_func(void); 8 // int TestPPC64Stubs(void) { 9 // return notoc_func(); 10 // } 11 import "C" 12 import "testing" 13 14 func testPPC64CallStubs(t *testing.T) { 15 // Verify the trampolines run on the testing machine. If they 16 // do not, or are missing, a crash is expected. 17 if C.TestPPC64Stubs() != 0 { 18 t.Skipf("This test requires binutils 2.35 or newer.") 19 } 20 } 21