1
0
mirror of https://github.com/golang/go synced 2024-11-24 06:00:11 -07:00
go/misc/cgo
Ian Lance Taylor 754f707f5f cmd/link, cmd/go, cmd/dist: use copy of libgcc.a for internal linking
Change the linker to use a copy of the C compiler support library,
libgcc.a, when doing internal linking.  This will be used to satisfy any
undefined symbols referenced by host objects.

Change the dist tool to copy the support library into a new directory
tree under GOROOT/pkg/libgcc.  This ensures that libgcc is available
even when building Go programs on a system that has no C compiler.  The
C compiler is required when building the Go installation in the first
place, but is not required thereafter.

Change the go tool to not link libgcc into cgo objects.

Correct the linker handling of a weak symbol in an ELF input object to
not always create a new symbol, but to use an existing symbol if there
is one; this is necessary on freebsd-amd64, where libgcc contains a weak
definition of compilerrt_abort_impl.

Fixes #9510.

Change-Id: I1ab28182263238d9bcaf6a42804e5da2a87d8778
Reviewed-on: https://go-review.googlesource.com/16741
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-14 18:56:17 +00:00
..
errors cmd/cgo, runtime: add checks for passing pointers from Go to C 2015-11-10 22:22:10 +00:00
gmp Fix several out of date references to 4g/5g/6g/8g/9g. 2015-06-26 03:38:21 +00:00
life
nocgo
stdio
test cmd/link, cmd/go, cmd/dist: use copy of libgcc.a for internal linking 2015-11-14 18:56:17 +00:00
testasan
testcarchive
testcshared cmd/go: buildmode=c-shared support for linux/arm64 2015-10-29 16:25:37 +00:00
testgodefs
testsanitizers runtime: don't call msanread when running on the system stack 2015-11-11 06:04:04 +00:00
testshared cmd/dist, cmd/go, misc/cgo/testshared: update testshared and run it on arm 2015-11-10 19:57:30 +00:00
testsigfwd
testso cmd/dist: convert testso test into Go 2015-06-12 04:33:50 +00:00
testsovar misc/cgo/testsovar: needs the extern keyword to export variables on non-windows platforms 2015-07-21 18:10:57 +00:00
testtls