This libgo patch fixes the go tool when using -buildmode={c-archive,c-shared,pie} with gccgo. The tests are misc/cgo tests that are not currently run but will be run soon. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian