You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if out, err := cmd.CombinedOutput(); err == nil {
if !bytes.Contains(out, []byte("GNU gold")) {
log.Fatalf("ARM external linker must be gold (issue #15696), but is not: %s", out)
}
}
First, in this ld/lib.go source code, the fatal logs are not printed because of err is not nil.
// If gold is not installed, gcc will silently switch
// back to ld.bfd. So we parse the version information
// and provide a useful error if gold is missing.
Second, following above comments, I expect successful build using ld.bfd. but failed. why?
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go build -ldflags "-v" reproduce.go
with below code in alpine linux/arm64What did you expect to see?
successful build without error or show detail log why build failed.
What did you see instead?
related issue : #15696
https://github.com/golang/go/blob/go1.18/src/cmd/link/internal/ld/lib.go#L1406-L1416
First, in this
ld/lib.go
source code, the fatal logs are not printed because oferr
is not nil.Second, following above comments, I expect successful build using
ld.bfd
. but failed. why?Third, origin relocation bug fixed binutils 2.36+. https://sourceware.org/bugzilla/show_bug.cgi?id=19962
but, still using gold linker because of above code.
The text was updated successfully, but these errors were encountered: