$ go version
go version devel +4a7cf960c3 Sat Mar 4 02:56:37 2017 +0000 linux/amd64
TestTwoGopathShlibs from misc/cgo/testshared fails when mid-stack inlining is enabled. To test with mid-stack inlining, we need to run the test by hand:
$ cd misc/cgo/testshared
$ export GOPATH=$PWD
$ go install -gcflags '-l=4' -installsuffix=6129484611666145821 -v -buildmode=shared runtime sync/atomic
$ go install -gcflags '-l=4' -installsuffix=6129484611666145821 -v -buildmode=shared -linkshared depBase
$ go install -gcflags '-l=4' -installsuffix=6129484611666145821 -v -buildmode=shared -linkshared dep2
$ go install -gcflags '-l=4' -installsuffix=6129484611666145821 -v -linkshared exe2
The last command fails with the output:
# exe2
main.main: relocation target os.Stdout not defined
main.main: relocation target type.*os.File not defined
go.itab.*reflect.rtype,reflect.Type: relocation target type.8b7X1see not defined
go.itab.*reflect.rtype,reflect.Type: relocation target type.H0+h5nWH not defined
main.main: undefined: "os.Stdout"
main.main: undefined: "type.*os.File"
go.itab.*reflect.rtype,reflect.Type: undefined: "type.8b7X1see"
go.itab.*reflect.rtype,reflect.Type: undefined: "type.H0+h5nWH"
The call to (*depBase.Dep).Method in exe2.go is inlined but this method should be dynamically loaded.
TestTwoGopathShlibsfrom misc/cgo/testshared fails when mid-stack inlining is enabled. To test with mid-stack inlining, we need to run the test by hand:The last command fails with the output:
The call to
(*depBase.Dep).Methodin exe2.go is inlined but this method should be dynamically loaded.