Open
Description
What version of Go are you using (go version
)?
Any, more specifically 1.8, 1.9, master, most probably all versions supporting AArch64/arm64 target
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
linux/arm64
What did you do?
GC on linux/arm64 assumes gold linker availability see src/cmd/link/internal/ld/lib.go:1182
When gold is not available gcc fails due to it missing, when it tries to invoke it. All in shared_test.
When gold flag is remove by removing sys.ARM64
from codition on src/cmd/link/internal/ld/lib.go:1173
, build/test fail with
--- FAIL: TestTrivialExecutable (0.29s)
shared_test.go:66: executing go install -installsuffix=5577006791947779410 -linkshared trivial failed exit status 2:
# trivial
/root/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
/usr/bin/ld: /tmp/go-link-151650837/go.o(.data.rel.ro+0x2c0): unresolvable R_AARCH64_ABS64 relocation against symbol `go.link.abihash.libruntime,sync-atomic.so'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
And so one for most of the cases shared_test.
What did you expect to see?
All tests pass. GC working with default binutils ld.
What did you see instead?
GC failing to build some binaries with binutils ld.