]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: fix checks for supported linker flags with relative paths.
authorJames Bartlett <jamesbartlett@newrelic.com>
Wed, 3 May 2023 18:27:05 +0000 (18:27 +0000)
committerCherry Mui <cherryyz@google.com>
Fri, 12 May 2023 23:21:11 +0000 (23:21 +0000)
commitdb22489012aabdd853d09d33e7525788d0acf2c4
tree753ea8c93bf625dbeac0c83ab68932da86f7ee97
parentc20b7a072a438d9dd806f2e075e029d1d2b0deec
cmd/link: fix checks for supported linker flags with relative paths.

The existing way of checking for supported linker flags causes false negatives
when there are relative paths passed to go tool link. This fixes the issue by
calling the external linker in the current working directory, instead of
in a temporary directory.

Fixes #59952

Change-Id: I173bb8b44902f30dacefde1c202586f87667ab70
Reviewed-on: https://go-review.googlesource.com/c/go/+/491796
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/link/internal/ld/lib.go