Skip to content

Commit f2f3b6c

Browse files
author
Elias Naur
committed
cmd/link: fix ARM gold linker check
CL 23400 introduced a check to make sure the gold linker is used on ARM host links. The check itself works, but the error checking logic was reversed; fix it. I manually verified that the check now correctly rejects host links on my RPi2 running an ancient rasbian without the gold linker installed. Updates #15696 Change-Id: I927832620f0a60e91a71fdedf8cbd2550247b666 Reviewed-on: https://go-review.googlesource.com/23421 Run-TryBot: Elias Naur <[email protected]> Reviewed-by: David Crawshaw <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 72eb46c commit f2f3b6c

File tree

1 file changed

+1
-1
lines changed
  • src/cmd/link/internal/ld

1 file changed

+1
-1
lines changed

src/cmd/link/internal/ld/lib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ func hostlink() {
11421142
// back to ld.bfd. So we parse the version information
11431143
// and provide a useful error if gold is missing.
11441144
cmd := exec.Command(extld, "-fuse-ld=gold", "-Wl,--version")
1145-
if out, err := cmd.CombinedOutput(); err != nil {
1145+
if out, err := cmd.CombinedOutput(); err == nil {
11461146
if !bytes.Contains(out, []byte("GNU gold")) {
11471147
log.Fatalf("ARM external linker must be gold (issue #15696), but is not: %s", out)
11481148
}

0 commit comments

Comments
 (0)